home *** CD-ROM | disk | FTP | other *** search
MacBinary | 2000-02-25 | 19.9 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Fri Feb 25 05:00:00 2000, modified Fri Feb 25 05:00:00 2000, creator 'CWIE', type ASCII, 19718 bytes "WEInlineInput.c" , at 0x4d86 286 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 57 45 49 6e 6c 69 | 6e 65 49 6e 70 75 74 2e |..WEInli|neInput.|
|00000010| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 4d 06 00 | 00 01 1e b4 dc 03 20 b4 |.....M..|...... .|
|00000060| dc 03 20 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.. .....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6f 2d 00 00 |........|....o-..|
|00000080| 2f 2a 0d 20 2a 09 57 45 | 49 6e 6c 69 6e 65 49 6e |/*. *.WE|InlineIn|
|00000090| 70 75 74 2e 63 0d 20 2a | 0d 20 2a 09 57 41 53 54 |put.c. *|. *.WAST|
|000000a0| 45 20 50 52 4f 4a 45 43 | 54 0d 20 2a 20 20 49 6e |E PROJEC|T. * In|
|000000b0| 6c 69 6e 65 20 49 6e 70 | 75 74 20 53 75 70 70 6f |line Inp|ut Suppo|
|000000c0| 72 74 0d 20 2a 0d 20 2a | 20 20 43 6f 70 79 72 69 |rt. *. *| Copyri|
|000000d0| 67 68 74 20 28 63 29 20 | 31 39 39 33 2d 31 39 39 |ght (c) |1993-199|
|000000e0| 38 20 4d 61 72 63 6f 20 | 50 69 6f 76 61 6e 65 6c |8 Marco |Piovanel|
|000000f0| 6c 69 0d 20 2a 09 41 6c | 6c 20 52 69 67 68 74 73 |li. *.Al|l Rights|
|00000100| 20 52 65 73 65 72 76 65 | 64 0d 20 2a 0d 20 2a 20 | Reserve|d. *. * |
|00000110| 20 43 20 70 6f 72 74 20 | 62 79 20 44 61 6e 20 43 | C port |by Dan C|
|00000120| 72 65 76 69 65 72 0d 20 | 2a 0d 20 2a 2f 0d 0d 2f |revier. |*. */../|
|00000130| 2a 0d 09 50 6f 72 74 69 | 6f 6e 73 20 63 6f 70 79 |*..Porti|ons copy|
|00000140| 72 69 67 68 74 20 a9 20 | 31 39 39 38 2d 32 30 30 |right . |1998-200|
|00000150| 30 20 62 79 20 41 70 70 | 6c 65 20 43 6f 6d 70 75 |0 by App|le Compu|
|00000160| 74 65 72 2c 20 49 6e 63 | 2e 20 41 6c 6c 20 72 69 |ter, Inc|. All ri|
|00000170| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 2e 0d 0d |ghts res|erved...|
|00000180| 09 43 68 61 6e 67 65 20 | 48 69 73 74 6f 72 79 3a |.Change |History:|
|00000190| 0d 09 09 30 31 2f 30 37 | 2f 30 30 09 54 57 42 09 |...01/07|/00.TWB.|
|000001a0| 09 43 61 72 62 6f 6e 3a | 20 41 45 20 68 61 6e 64 |.Carbon:| AE hand|
|000001b0| 6c 65 72 20 72 65 66 63 | 6f 6e 20 74 79 70 65 20 |ler refc|on type |
|000001c0| 63 68 61 6e 67 65 64 2e | 20 0d 09 09 09 09 09 09 |changed.| .......|
|000001d0| 09 43 61 72 62 6f 6e 20 | 73 70 65 63 69 66 69 63 |.Carbon |specific|
|000001e0| 20 63 6f 64 65 20 69 6e | 20 5f 57 45 48 61 6e 64 | code in| _WEHand|
|000001f0| 6c 65 55 70 64 61 74 65 | 41 63 74 69 76 65 49 6e |leUpdate|ActiveIn|
|00000200| 70 75 74 41 72 65 61 0d | 09 09 09 09 09 09 09 6e |putArea.|.......n|
|00000210| 65 65 64 65 64 20 61 20 | 62 6c 6f 63 6b 20 73 6f |eeded a |block so|
|00000220| 20 69 74 20 77 69 6c 6c | 20 63 6f 6d 70 69 6c 65 | it will| compile|
|00000230| 20 69 6e 20 43 2e 20 0d | 09 09 31 31 2f 31 30 2f | in C. .|..11/10/|
|00000240| 39 39 09 54 57 42 09 09 | 43 6c 65 61 6e 20 75 70 |99.TWB..|Clean up|
|00000250| 20 74 68 65 20 70 72 69 | 76 61 74 65 20 69 6e 74 | the pri|vate int|
|00000260| 65 72 66 61 63 65 73 2e | 20 0d 2a 2f 0d 0d 0d 23 |erfaces.| .*/...#|
|00000270| 69 6e 63 6c 75 64 65 20 | 22 57 41 53 54 45 49 6e |include |"WASTEIn|
|00000280| 74 66 2e 68 22 0d 0d 2f | 2f 20 73 70 65 63 69 61 |tf.h"../|/ specia|
|00000290| 6c 20 65 76 65 6e 74 20 | 49 44 20 75 73 65 64 20 |l event |ID used |
|000002a0| 62 79 20 4b 6f 74 6f 65 | 72 69 20 61 6e 64 20 6f |by Kotoe|ri and o|
|000002b0| 74 68 65 72 20 69 6e 70 | 75 74 20 6d 65 74 68 6f |ther inp|ut metho|
|000002c0| 64 73 0d 0d 65 6e 75 6d | 0d 7b 0d 09 6b 47 65 74 |ds..enum|.{..kGet|
|000002d0| 54 65 78 74 20 3d 20 27 | 67 74 78 74 27 0d 7d 3b |Text = '|gtxt'.};|
|000002e0| 0d 0d 23 69 66 20 57 41 | 53 54 45 5f 54 53 4d 5f |..#if WA|STE_TSM_|
|000002f0| 53 55 50 50 4f 52 54 0d | 0d 23 69 66 20 55 4e 49 |SUPPORT.|.#if UNI|
|00000300| 56 45 52 53 41 4c 5f 49 | 4e 54 45 52 46 41 43 45 |VERSAL_I|NTERFACE|
|00000310| 53 5f 56 45 52 53 49 4f | 4e 20 3e 3d 20 30 78 30 |S_VERSIO|N >= 0x0|
|00000320| 33 33 30 0d 74 79 70 65 | 64 65 66 20 55 49 6e 74 |330.type|def UInt|
|00000330| 33 32 20 41 45 48 61 6e | 64 6c 65 72 52 65 66 63 |32 AEHan|dlerRefc|
|00000340| 6f 6e 3b 0d 23 65 6c 73 | 65 0d 74 79 70 65 64 65 |on;.#els|e.typede|
|00000350| 66 20 53 49 6e 74 33 32 | 20 41 45 48 61 6e 64 6c |f SInt32| AEHandl|
|00000360| 65 72 52 65 66 63 6f 6e | 3b 0d 23 65 6e 64 69 66 |erRefcon|;.#endif|
|00000370| 0d 0d 2f 2f 20 73 74 61 | 74 69 63 20 76 61 72 69 |..// sta|tic vari|
|00000380| 61 62 6c 65 73 0d 0d 73 | 74 61 74 69 63 20 41 45 |ables..s|tatic AE|
|00000390| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 55 50 50 20 |EventHan|dlerUPP |
|000003a0| 5f 77 65 55 70 64 61 74 | 65 41 63 74 69 76 65 49 |_weUpdat|eActiveI|
|000003b0| 6e 70 75 74 41 72 65 61 | 48 61 6e 64 6c 65 72 20 |nputArea|Handler |
|000003c0| 3d 20 6e 69 6c 3b 0d 73 | 74 61 74 69 63 20 41 45 |= nil;.s|tatic AE|
|000003d0| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 55 50 50 20 |EventHan|dlerUPP |
|000003e0| 5f 77 65 50 6f 73 69 74 | 69 6f 6e 54 6f 4f 66 66 |_wePosit|ionToOff|
|000003f0| 73 65 74 48 61 6e 64 6c | 65 72 20 3d 20 6e 69 6c |setHandl|er = nil|
|00000400| 3b 0d 73 74 61 74 69 63 | 20 41 45 45 76 65 6e 74 |;.static| AEEvent|
|00000410| 48 61 6e 64 6c 65 72 55 | 50 50 20 5f 77 65 4f 66 |HandlerU|PP _weOf|
|00000420| 66 73 65 74 54 6f 50 6f | 73 69 74 69 6f 6e 48 61 |fsetToPo|sitionHa|
|00000430| 6e 64 6c 65 72 20 3d 20 | 6e 69 6c 3b 0d 73 74 61 |ndler = |nil;.sta|
|00000440| 74 69 63 20 41 45 45 76 | 65 6e 74 48 61 6e 64 6c |tic AEEv|entHandl|
|00000450| 65 72 55 50 50 20 5f 77 | 65 47 65 74 54 65 78 74 |erUPP _w|eGetText|
|00000460| 48 61 6e 64 6c 65 72 20 | 3d 20 6e 69 6c 3b 0d 0d |Handler |= nil;..|
|00000470| 70 61 73 63 61 6c 20 4f | 53 45 72 72 20 5f 57 45 |pascal O|SErr _WE|
|00000480| 48 69 6c 69 74 65 52 61 | 6e 67 65 41 72 72 61 79 |HiliteRa|ngeArray|
|00000490| 28 54 65 78 74 52 61 6e | 67 65 41 72 72 61 79 48 |(TextRan|geArrayH|
|000004a0| 61 6e 64 6c 65 20 68 54 | 72 61 79 2c 20 57 45 48 |andle hT|ray, WEH|
|000004b0| 61 6e 64 6c 65 20 68 57 | 45 29 0d 7b 0d 09 57 45 |andle hW|E).{..WE|
|000004c0| 50 74 72 20 70 57 45 20 | 3d 20 2a 68 57 45 3b 09 |Ptr pWE |= *hWE;.|
|000004d0| 2f 2f 20 61 73 73 75 6d | 65 20 57 45 20 72 65 63 |// assum|e WE rec|
|000004e0| 6f 72 64 20 69 73 20 61 | 6c 72 65 61 64 79 20 6c |ord is a|lready l|
|000004f0| 6f 63 6b 65 64 0d 09 54 | 65 78 74 52 61 6e 67 65 |ocked..T|extRange|
|00000500| 50 74 72 20 70 52 61 6e | 67 65 3b 0d 09 53 49 6e |Ptr pRan|ge;..SIn|
|00000510| 74 33 32 20 72 61 6e 67 | 65 53 74 61 72 74 2c 20 |t32 rang|eStart, |
|00000520| 72 61 6e 67 65 45 6e 64 | 3b 0d 09 53 49 6e 74 31 |rangeEnd|;..SInt1|
|00000530| 36 20 68 69 6c 69 74 65 | 53 74 79 6c 65 3b 0d 09 |6 hilite|Style;..|
|00000540| 57 45 54 65 78 74 53 74 | 79 6c 65 20 74 73 3b 0d |WETextSt|yle ts;.|
|00000550| 09 53 49 6e 74 31 36 20 | 72 61 6e 67 65 49 6e 64 |.SInt16 |rangeInd|
|00000560| 65 78 3b 0d 09 42 6f 6f | 6c 65 61 6e 20 73 61 76 |ex;..Boo|lean sav|
|00000570| 65 54 72 61 79 4c 6f 63 | 6b 3b 0d 09 4f 53 45 72 |eTrayLoc|k;..OSEr|
|00000580| 72 20 65 72 72 3b 0d 0d | 09 2f 2f 20 6c 6f 63 6b |r err;..|.// lock|
|00000590| 20 64 6f 77 6e 20 74 68 | 65 20 72 61 6e 67 65 20 | down th|e range |
|000005a0| 61 72 72 61 79 0d 09 73 | 61 76 65 54 72 61 79 4c |array..s|aveTrayL|
|000005b0| 6f 63 6b 20 3d 20 5f 57 | 45 53 65 74 48 61 6e 64 |ock = _W|ESetHand|
|000005c0| 6c 65 4c 6f 63 6b 28 28 | 48 61 6e 64 6c 65 29 68 |leLock((|Handle)h|
|000005d0| 54 72 61 79 2c 20 74 72 | 75 65 29 3b 0d 09 70 52 |Tray, tr|ue);..pR|
|000005e0| 61 6e 67 65 20 3d 20 28 | 2a 68 54 72 61 79 29 2d |ange = (|*hTray)-|
|000005f0| 3e 66 52 61 6e 67 65 3b | 0d 0d 09 2f 2f 20 77 61 |>fRange;|...// wa|
|00000600| 6c 6b 20 74 68 65 20 68 | 69 6c 69 74 65 20 72 61 |lk the h|ilite ra|
|00000610| 6e 67 65 20 61 72 72 61 | 79 0d 09 66 6f 72 20 28 |nge arra|y..for (|
|00000620| 72 61 6e 67 65 49 6e 64 | 65 78 20 3d 20 28 2a 68 |rangeInd|ex = (*h|
|00000630| 54 72 61 79 29 2d 3e 66 | 4e 75 6d 4f 66 52 61 6e |Tray)->f|NumOfRan|
|00000640| 67 65 73 20 2d 20 31 3b | 20 72 61 6e 67 65 49 6e |ges - 1;| rangeIn|
|00000650| 64 65 78 20 3e 3d 20 30 | 3b 20 72 61 6e 67 65 49 |dex >= 0|; rangeI|
|00000660| 6e 64 65 78 2d 2d 20 29 | 0d 09 7b 0d 0d 09 09 2f |ndex-- )|..{..../|
|00000670| 2f 20 74 68 65 20 6f 66 | 66 73 65 74 73 20 69 6e |/ the of|fsets in|
|00000680| 20 74 68 65 20 72 61 6e | 67 65 20 61 72 72 61 79 | the ran|ge array|
|00000690| 20 61 72 65 20 72 65 6c | 61 74 69 76 65 20 74 6f | are rel|ative to|
|000006a0| 20 74 68 65 20 62 65 67 | 69 6e 6e 69 6e 67 0d 09 | the beg|inning..|
|000006b0| 09 2f 2f 20 6f 66 20 74 | 68 65 20 61 63 74 69 76 |.// of t|he activ|
|000006c0| 65 20 69 6e 70 75 74 20 | 61 72 65 61 3a 20 63 6f |e input |area: co|
|000006d0| 6e 76 65 72 74 20 74 68 | 65 6d 20 74 6f 20 61 62 |nvert th|em to ab|
|000006e0| 73 6f 6c 75 74 65 20 6f | 66 66 73 65 74 73 0d 09 |solute o|ffsets..|
|000006f0| 09 72 61 6e 67 65 53 74 | 61 72 74 20 3d 20 70 57 |.rangeSt|art = pW|
|00000700| 45 2d 3e 74 73 6d 41 72 | 65 61 53 74 61 72 74 20 |E->tsmAr|eaStart |
|00000710| 2b 20 70 52 61 6e 67 65 | 2d 3e 66 53 74 61 72 74 |+ pRange|->fStart|
|00000720| 3b 0d 09 09 72 61 6e 67 | 65 45 6e 64 20 3d 20 70 |;...rang|eEnd = p|
|00000730| 57 45 2d 3e 74 73 6d 41 | 72 65 61 53 74 61 72 74 |WE->tsmA|reaStart|
|00000740| 20 2b 20 70 52 61 6e 67 | 65 2d 3e 66 45 6e 64 3b | + pRang|e->fEnd;|
|00000750| 0d 09 09 68 69 6c 69 74 | 65 53 74 79 6c 65 20 3d |...hilit|eStyle =|
|00000760| 20 70 52 61 6e 67 65 2d | 3e 66 48 69 6c 69 74 65 | pRange-|>fHilite|
|00000770| 53 74 79 6c 65 3b 0d 0d | 09 09 2f 2f 20 74 61 6b |Style;..|..// tak|
|00000780| 65 20 74 68 65 20 61 62 | 73 6f 6c 75 74 65 20 76 |e the ab|solute v|
|00000790| 61 6c 75 65 20 6f 66 20 | 68 69 6c 69 74 65 53 74 |alue of |hiliteSt|
|000007a0| 79 6c 65 0d 09 09 68 69 | 6c 69 74 65 53 74 79 6c |yle...hi|liteStyl|
|000007b0| 65 20 3d 20 41 42 53 28 | 68 69 6c 69 74 65 53 74 |e = ABS(|hiliteSt|
|000007c0| 79 6c 65 29 3b 0d 0d 09 | 09 2f 2f 20 69 66 20 68 |yle);...|.// if h|
|000007d0| 69 6c 69 74 65 53 74 79 | 6c 65 20 69 73 20 6b 43 |iliteSty|le is kC|
|000007e0| 61 72 65 74 50 6f 73 69 | 74 69 6f 6e 2c 20 73 65 |aretPosi|tion, se|
|000007f0| 74 20 74 68 65 20 73 65 | 6c 65 63 74 69 6f 6e 20 |t the se|lection |
|00000800| 72 61 6e 67 65 0d 09 09 | 69 66 20 28 68 69 6c 69 |range...|if (hili|
|00000810| 74 65 53 74 79 6c 65 20 | 3d 3d 20 6b 43 61 72 65 |teStyle |== kCare|
|00000820| 74 50 6f 73 69 74 69 6f | 6e 29 0d 09 09 7b 0d 09 |tPositio|n)...{..|
|00000830| 09 09 70 57 45 2d 3e 73 | 65 6c 53 74 61 72 74 20 |..pWE->s|elStart |
|00000840| 3d 20 72 61 6e 67 65 53 | 74 61 72 74 3b 0d 09 09 |= rangeS|tart;...|
|00000850| 09 70 57 45 2d 3e 73 65 | 6c 45 6e 64 20 3d 20 72 |.pWE->se|lEnd = r|
|00000860| 61 6e 67 65 45 6e 64 3b | 0d 09 09 7d 0d 09 09 65 |angeEnd;|...}...e|
|00000870| 6c 73 65 0d 09 09 7b 0d | 09 09 09 68 69 6c 69 74 |lse...{.|...hilit|
|00000880| 65 53 74 79 6c 65 20 2d | 3d 20 6b 52 61 77 54 65 |eStyle -|= kRawTe|
|00000890| 78 74 3b 0d 09 09 09 2f | 2f 20 6f 74 68 65 72 77 |xt;..../|/ otherw|
|000008a0| 69 73 65 20 73 65 74 20 | 74 68 65 20 57 45 54 65 |ise set |the WETe|
|000008b0| 78 74 53 74 79 6c 65 20 | 66 6c 61 67 73 20 6f 66 |xtStyle |flags of|
|000008c0| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 72 | the spe|cified r|
|000008d0| 61 6e 67 65 20 61 70 70 | 72 6f 70 72 69 61 74 65 |ange app|ropriate|
|000008e0| 6c 79 0d 09 09 09 69 66 | 20 28 28 68 69 6c 69 74 |ly....if| ((hilit|
|000008f0| 65 53 74 79 6c 65 20 3e | 3d 20 30 29 20 26 26 20 |eStyle >|= 0) && |
|00000900| 28 68 69 6c 69 74 65 53 | 74 79 6c 65 20 3c 3d 20 |(hiliteS|tyle <= |
|00000910| 33 29 29 0d 09 09 09 7b | 0d 09 09 09 09 74 73 2e |3))....{|.....ts.|
|00000920| 74 73 46 6c 61 67 73 20 | 3d 20 30 78 31 30 20 2b |tsFlags |= 0x10 +|
|00000930| 20 28 68 69 6c 69 74 65 | 53 74 79 6c 65 20 3c 3c | (hilite|Style <<|
|00000940| 20 74 73 54 53 4d 53 65 | 6c 65 63 74 65 64 29 3b | tsTSMSe|lected);|
|00000950| 0d 09 09 09 09 69 66 20 | 28 28 65 72 72 20 3d 20 |.....if |((err = |
|00000960| 5f 57 45 53 65 74 53 74 | 79 6c 65 52 61 6e 67 65 |_WESetSt|yleRange|
|00000970| 28 72 61 6e 67 65 53 74 | 61 72 74 2c 20 72 61 6e |(rangeSt|art, ran|
|00000980| 67 65 45 6e 64 2c 20 77 | 65 44 6f 46 6c 61 67 73 |geEnd, w|eDoFlags|
|00000990| 2c 20 26 74 73 2c 20 68 | 57 45 29 29 20 21 3d 20 |, &ts, h|WE)) != |
|000009a0| 6e 6f 45 72 72 29 0d 09 | 09 09 09 7b 0d 09 09 09 |noErr)..|...{....|
|000009b0| 09 09 67 6f 74 6f 20 63 | 6c 65 61 6e 75 70 3b 0d |..goto c|leanup;.|
|000009c0| 09 09 09 09 7d 0d 09 09 | 09 7d 0d 09 09 7d 0d 09 |....}...|.}...}..|
|000009d0| 09 2f 2f 20 67 6f 20 74 | 6f 20 6e 65 78 74 20 74 |.// go t|o next t|
|000009e0| 65 78 74 20 72 61 6e 67 | 65 20 65 6c 65 6d 65 6e |ext rang|e elemen|
|000009f0| 74 0d 09 09 70 52 61 6e | 67 65 2b 2b 3b 0d 09 7d |t...pRan|ge++;..}|
|00000a00| 0d 0d 09 2f 2f 20 63 6c | 65 61 72 20 72 65 73 75 |...// cl|ear resu|
|00000a10| 6c 74 20 63 6f 64 65 0d | 09 65 72 72 20 3d 20 6e |lt code.|.err = n|
|00000a20| 6f 45 72 72 3b 0d 0d 63 | 6c 65 61 6e 75 70 3a 0d |oErr;..c|leanup:.|
|00000a30| 09 2f 2f 20 75 6e 6c 6f | 63 6b 20 74 68 65 20 72 |.// unlo|ck the r|
|00000a40| 61 6e 67 65 20 61 72 72 | 61 79 0d 09 5f 57 45 53 |ange arr|ay.._WES|
|00000a50| 65 74 48 61 6e 64 6c 65 | 4c 6f 63 6b 28 28 48 61 |etHandle|Lock((Ha|
|00000a60| 6e 64 6c 65 29 68 54 72 | 61 79 2c 20 73 61 76 65 |ndle)hTr|ay, save|
|00000a70| 54 72 61 79 4c 6f 63 6b | 29 3b 0d 0d 09 72 65 74 |TrayLock|);...ret|
|00000a80| 75 72 6e 20 65 72 72 3b | 0d 7d 0d 0d 73 74 61 74 |urn err;|.}..stat|
|00000a90| 69 63 20 70 61 73 63 61 | 6c 20 4f 53 45 72 72 20 |ic pasca|l OSErr |
|00000aa0| 5f 57 45 48 61 6e 64 6c | 65 55 70 64 61 74 65 41 |_WEHandl|eUpdateA|
|00000ab0| 63 74 69 76 65 49 6e 70 | 75 74 41 72 65 61 28 63 |ctiveInp|utArea(c|
|00000ac0| 6f 6e 73 74 20 41 70 70 | 6c 65 45 76 65 6e 74 20 |onst App|leEvent |
|00000ad0| 2a 61 65 2c 20 41 70 70 | 6c 65 45 76 65 6e 74 20 |*ae, App|leEvent |
|00000ae0| 2a 72 65 70 6c 79 2c 20 | 41 45 48 61 6e 64 6c 65 |*reply, |AEHandle|
|00000af0| 72 52 65 66 63 6f 6e 20 | 68 61 6e 64 6c 65 72 52 |rRefcon |handlerR|
|00000b00| 65 66 43 6f 6e 29 0d 7b | 0d 23 70 72 61 67 6d 61 |efCon).{|.#pragma|
|00000b10| 20 75 6e 75 73 65 64 28 | 72 65 70 6c 79 2c 20 68 | unused(|reply, h|
|00000b20| 61 6e 64 6c 65 72 52 65 | 66 43 6f 6e 29 0d 09 57 |andlerRe|fCon)..W|
|00000b30| 45 48 61 6e 64 6c 65 20 | 68 57 45 20 3d 20 6e 69 |EHandle |hWE = ni|
|00000b40| 6c 3b 0d 09 57 45 50 74 | 72 20 70 57 45 3b 0d 09 |l;..WEPt|r pWE;..|
|00000b50| 41 45 44 65 73 63 20 74 | 65 78 74 3b 0d 09 41 45 |AEDesc t|ext;..AE|
|00000b60| 44 65 73 63 20 68 69 6c | 69 74 65 54 72 61 79 3b |Desc hil|iteTray;|
|00000b70| 0d 09 54 65 78 74 52 61 | 6e 67 65 20 70 69 6e 52 |..TextRa|nge pinR|
|00000b80| 61 6e 67 65 3b 0d 09 53 | 49 6e 74 33 32 20 74 6f |ange;..S|Int32 to|
|00000b90| 74 61 6c 4c 65 6e 67 74 | 68 3b 0d 09 53 49 6e 74 |talLengt|h;..SInt|
|00000ba0| 33 32 20 66 69 78 4c 65 | 6e 67 74 68 3b 0d 09 53 |32 fixLe|ngth;..S|
|00000bb0| 49 6e 74 33 32 20 74 73 | 6d 4f 66 66 73 65 74 3b |Int32 ts|mOffset;|
|00000bc0| 0d 09 44 65 73 63 54 79 | 70 65 20 61 63 74 75 61 |..DescTy|pe actua|
|00000bd0| 6c 54 79 70 65 3b 0d 09 | 53 49 6e 74 33 32 20 61 |lType;..|SInt32 a|
|00000be0| 63 74 75 61 6c 53 69 7a | 65 3b 0d 09 47 72 61 66 |ctualSiz|e;..Graf|
|00000bf0| 50 74 72 20 73 61 76 65 | 50 6f 72 74 3b 0d 09 57 |Ptr save|Port;..W|
|00000c00| 45 41 63 74 69 6f 6e 48 | 61 6e 64 6c 65 20 68 41 |EActionH|andle hA|
|00000c10| 63 74 69 6f 6e 3b 0d 09 | 42 6f 6f 6c 65 61 6e 20 |ction;..|Boolean |
|00000c20| 73 61 76 65 41 75 74 6f | 53 63 72 6f 6c 6c 3b 0d |saveAuto|Scroll;.|
|00000c30| 09 42 6f 6f 6c 65 61 6e | 20 73 61 76 65 57 45 4c |.Boolean| saveWEL|
|00000c40| 6f 63 6b 20 3d 20 66 61 | 6c 73 65 3b 0d 09 4f 53 |ock = fa|lse;..OS|
|00000c50| 45 72 72 20 65 72 72 3b | 0d 0d 09 2f 2f 20 69 6e |Err err;|...// in|
|00000c60| 69 74 69 61 6c 69 7a 65 | 20 64 65 73 63 72 69 70 |itialize| descrip|
|00000c70| 74 6f 72 73 20 74 6f 20 | 6e 75 6c 6c 20 76 61 6c |tors to |null val|
|00000c80| 75 65 73 0d 09 74 65 78 | 74 2e 64 65 73 63 72 69 |ues..tex|t.descri|
|00000c90| 70 74 6f 72 54 79 70 65 | 20 3d 20 74 79 70 65 4e |ptorType| = typeN|
|00000ca0| 75 6c 6c 3b 0d 09 74 65 | 78 74 2e 64 61 74 61 48 |ull;..te|xt.dataH|
|00000cb0| 61 6e 64 6c 65 20 3d 20 | 6e 69 6c 3b 0d 09 68 69 |andle = |nil;..hi|
|00000cc0| 6c 69 74 65 54 72 61 79 | 2e 64 65 73 63 72 69 70 |liteTray|.descrip|
|00000cd0| 74 6f 72 54 79 70 65 20 | 3d 20 74 79 70 65 4e 75 |torType |= typeNu|
|00000ce0| 6c 6c 3b 0d 09 68 69 6c | 69 74 65 54 72 61 79 2e |ll;..hil|iteTray.|
|00000cf0| 64 61 74 61 48 61 6e 64 | 6c 65 20 3d 20 6e 69 6c |dataHand|le = nil|
|00000d00| 3b 0d 0d 09 2f 2f 20 65 | 78 74 72 61 63 74 20 57 |;...// e|xtract W|
|00000d10| 45 20 68 61 6e 64 6c 65 | 0d 09 69 66 20 28 28 65 |E handle|..if ((e|
|00000d20| 72 72 20 3d 20 41 45 47 | 65 74 50 61 72 61 6d 50 |rr = AEG|etParamP|
|00000d30| 74 72 28 61 65 2c 20 6b | 65 79 41 45 54 53 4d 44 |tr(ae, k|eyAETSMD|
|00000d40| 6f 63 75 6d 65 6e 74 52 | 65 66 63 6f 6e 2c 20 74 |ocumentR|efcon, t|
|00000d50| 79 70 65 4c 6f 6e 67 49 | 6e 74 65 67 65 72 2c 0d |ypeLongI|nteger,.|
|00000d60| 09 09 09 26 61 63 74 75 | 61 6c 54 79 70 65 2c 20 |...&actu|alType, |
|00000d70| 26 68 57 45 2c 20 73 69 | 7a 65 6f 66 28 68 57 45 |&hWE, si|zeof(hWE|
|00000d80| 29 2c 20 26 61 63 74 75 | 61 6c 53 69 7a 65 29 29 |), &actu|alSize))|
|00000d90| 20 21 3d 20 6e 6f 45 72 | 72 29 0d 09 7b 0d 09 09 | != noEr|r)..{...|
|00000da0| 67 6f 74 6f 20 63 6c 65 | 61 6e 75 70 3b 0d 09 7d |goto cle|anup;..}|
|00000db0| 0d 0d 09 2f 2f 20 6c 6f | 63 6b 20 74 68 65 20 57 |...// lo|ck the W|
|00000dc0| 45 20 68 61 6e 64 6c 65 | 0d 09 73 61 76 65 57 45 |E handle|..saveWE|
|00000dd0| 4c 6f 63 6b 20 3d 20 5f | 57 45 53 65 74 48 61 6e |Lock = _|WESetHan|
|00000de0| 64 6c 65 4c 6f 63 6b 28 | 28 48 61 6e 64 6c 65 29 |dleLock(|(Handle)|
|00000df0| 20 68 57 45 2c 20 74 72 | 75 65 29 3b 0d 09 70 57 | hWE, tr|ue);..pW|
|00000e00| 45 20 3d 20 2a 68 57 45 | 3b 0d 0d 09 2f 2f 20 72 |E = *hWE|;...// r|
|00000e10| 65 74 75 72 6e 20 61 6e | 20 65 72 72 6f 72 20 63 |eturn an| error c|
|00000e20| 6f 64 65 20 69 66 20 74 | 68 69 73 20 69 6e 73 74 |ode if t|his inst|
|00000e30| 61 6e 63 65 20 69 73 20 | 72 65 61 64 2d 6f 6e 6c |ance is |read-onl|
|00000e40| 79 0d 09 65 72 72 20 3d | 20 77 65 52 65 61 64 4f |y..err =| weReadO|
|00000e50| 6e 6c 79 45 72 72 3b 0d | 09 69 66 20 28 42 54 53 |nlyErr;.|.if (BTS|
|00000e60| 54 28 70 57 45 2d 3e 66 | 65 61 74 75 72 65 73 2c |T(pWE->f|eatures,|
|00000e70| 20 77 65 46 52 65 61 64 | 4f 6e 6c 79 29 29 0d 09 | weFRead|Only))..|
|00000e80| 7b 0d 09 09 67 6f 74 6f | 20 63 6c 65 61 6e 75 70 |{...goto| cleanup|
|00000e90| 3b 0d 09 7d 0d 0d 09 2f | 2f 20 63 61 6c 6c 20 74 |;..}.../|/ call t|
|00000ea0| 68 65 20 70 72 65 2d 75 | 70 64 61 74 65 20 63 61 |he pre-u|pdate ca|
|00000eb0| 6c 6c 62 61 63 6b 2c 20 | 69 66 20 70 72 65 73 65 |llback, |if prese|
|00000ec0| 6e 74 0d 09 69 66 20 28 | 70 57 45 2d 3e 74 73 6d |nt..if (|pWE->tsm|
|00000ed0| 50 72 65 55 70 64 61 74 | 65 20 21 3d 20 6e 69 6c |PreUpdat|e != nil|
|00000ee0| 29 0d 09 7b 0d 09 09 43 | 61 6c 6c 57 45 54 53 4d |)..{...C|allWETSM|
|00000ef0| 50 72 65 55 70 64 61 74 | 65 50 72 6f 63 28 68 57 |PreUpdat|eProc(hW|
|00000f00| 45 2c 20 70 57 45 2d 3e | 74 73 6d 50 72 65 55 70 |E, pWE->|tsmPreUp|
|00000f10| 64 61 74 65 29 3b 0d 09 | 7d 0d 0d 09 2f 2f 20 68 |date);..|}...// h|
|00000f20| 69 64 65 20 74 68 65 20 | 63 61 72 65 74 20 69 66 |ide the |caret if|
|00000f30| 20 69 74 27 73 20 73 68 | 6f 77 69 6e 67 0d 09 69 | it's sh|owing..i|
|00000f40| 66 20 28 42 54 53 54 28 | 70 57 45 2d 3e 66 6c 61 |f (BTST(|pWE->fla|
|00000f50| 67 73 2c 20 77 65 46 43 | 61 72 65 74 56 69 73 69 |gs, weFC|aretVisi|
|00000f60| 62 6c 65 29 29 0d 09 7b | 0d 09 09 5f 57 45 42 6c |ble))..{|..._WEBl|
|00000f70| 69 6e 6b 43 61 72 65 74 | 28 68 57 45 29 3b 0d 09 |inkCaret|(hWE);..|
|00000f80| 7d 0d 0d 09 2f 2f 20 65 | 78 74 72 61 63 74 20 74 |}...// e|xtract t|
|00000f90| 68 65 20 74 65 78 74 20 | 64 65 73 63 72 69 70 74 |he text |descript|
|00000fa0| 6f 72 0d 09 69 66 20 28 | 28 65 72 72 20 3d 20 41 |or..if (|(err = A|
|00000fb0| 45 47 65 74 50 61 72 61 | 6d 44 65 73 63 28 61 65 |EGetPara|mDesc(ae|
|00000fc0| 2c 20 6b 65 79 41 45 54 | 68 65 44 61 74 61 2c 20 |, keyAET|heData, |
|00000fd0| 74 79 70 65 43 68 61 72 | 2c 20 26 74 65 78 74 29 |typeChar|, &text)|
|00000fe0| 29 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 7b 0d 09 |) != noE|rr)..{..|
|00000ff0| 09 67 6f 74 6f 20 63 6c | 65 61 6e 75 70 3b 0d 09 |.goto cl|eanup;..|
|00001000| 7d 0d 0d 09 2f 2f 20 67 | 65 74 20 74 6f 74 61 6c |}...// g|et total|
|00001010| 20 6c 65 6e 67 74 68 20 | 6f 66 20 74 65 78 74 20 | length |of text |
|00001020| 69 6e 20 74 68 65 20 61 | 63 74 69 76 65 20 69 6e |in the a|ctive in|
|00001030| 70 75 74 20 61 72 65 61 | 0d 0d 23 69 66 20 41 43 |put area|..#if AC|
|00001040| 43 45 53 53 4f 52 5f 43 | 41 4c 4c 53 5f 41 52 45 |CESSOR_C|ALLS_ARE|
|00001050| 5f 46 55 4e 43 54 49 4f | 4e 53 0d 09 74 6f 74 61 |_FUNCTIO|NS..tota|
|00001060| 6c 4c 65 6e 67 74 68 20 | 3d 20 41 45 47 65 74 44 |lLength |= AEGetD|
|00001070| 65 73 63 44 61 74 61 53 | 69 7a 65 28 26 74 65 78 |escDataS|ize(&tex|
|00001080| 74 29 3b 0d 23 65 6c 73 | 65 0d 09 74 6f 74 61 6c |t);.#els|e..total|
|00001090| 4c 65 6e 67 74 68 20 3d | 20 47 65 74 48 61 6e 64 |Length =| GetHand|
|000010a0| 6c 65 53 69 7a 65 28 74 | 65 78 74 2e 64 61 74 61 |leSize(t|ext.data|
|000010b0| 48 61 6e 64 6c 65 29 3b | 0d 23 65 6e 64 69 66 0d |Handle);|.#endif.|
|000010c0| 0d 09 2f 2f 20 65 78 74 | 72 61 63 74 20 74 68 65 |..// ext|ract the|
|000010d0| 20 6c 65 6e 67 74 68 20 | 6f 66 20 63 6f 6e 66 69 | length |of confi|
|000010e0| 72 6d 65 64 20 74 65 78 | 74 20 69 6e 20 74 68 65 |rmed tex|t in the|
|000010f0| 20 61 63 74 69 76 65 20 | 69 6e 70 75 74 20 61 72 | active |input ar|
|00001100| 65 61 0d 09 69 66 20 28 | 28 65 72 72 20 3d 20 41 |ea..if (|(err = A|
|00001110| 45 47 65 74 50 61 72 61 | 6d 50 74 72 28 61 65 2c |EGetPara|mPtr(ae,|
|00001120| 20 6b 65 79 41 45 46 69 | 78 4c 65 6e 67 74 68 2c | keyAEFi|xLength,|
|00001130| 20 74 79 70 65 4c 6f 6e | 67 49 6e 74 65 67 65 72 | typeLon|gInteger|
|00001140| 2c 20 26 61 63 74 75 61 | 6c 54 79 70 65 2c 0d 09 |, &actua|lType,..|
|00001150| 09 09 26 66 69 78 4c 65 | 6e 67 74 68 2c 20 73 69 |..&fixLe|ngth, si|
|00001160| 7a 65 6f 66 28 66 69 78 | 4c 65 6e 67 74 68 29 2c |zeof(fix|Length),|
|00001170| 20 26 61 63 74 75 61 6c | 53 69 7a 65 29 29 20 21 | &actual|Size)) !|
|00001180| 3d 20 6e 6f 45 72 72 29 | 0d 09 7b 0d 09 09 67 6f |= noErr)|..{...go|
|00001190| 74 6f 20 63 6c 65 61 6e | 75 70 3b 0d 09 7d 0d 0d |to clean|up;..}..|
|000011a0| 09 2f 2f 20 69 66 20 66 | 69 78 4c 65 6e 67 74 68 |.// if f|ixLength|
|000011b0| 20 3d 20 2d 31 2c 20 61 | 6c 6c 20 74 65 78 74 20 | = -1, a|ll text |
|000011c0| 69 73 20 63 6f 6e 66 69 | 72 6d 65 64 0d 09 69 66 |is confi|rmed..if|
|000011d0| 20 28 66 69 78 4c 65 6e | 67 74 68 20 3d 3d 20 2d | (fixLen|gth == -|
|000011e0| 31 29 0d 09 7b 0d 09 09 | 66 69 78 4c 65 6e 67 74 |1)..{...|fixLengt|
|000011f0| 68 20 3d 20 74 6f 74 61 | 6c 4c 65 6e 67 74 68 3b |h = tota|lLength;|
|00001200| 0d 09 7d 0d 0d 09 2f 2f | 20 69 66 20 74 68 65 72 |..}...//| if ther|
|00001210| 65 27 73 20 63 75 72 72 | 65 6e 74 6c 79 20 6e 6f |e's curr|ently no|
|00001220| 20 61 63 74 69 76 65 20 | 69 6e 70 75 74 20 61 72 | active |input ar|
|00001230| 65 61 2c 20 6f 70 65 6e | 20 6f 6e 65 0d 09 69 66 |ea, open| one..if|
|00001240| 20 28 70 57 45 2d 3e 74 | 73 6d 41 72 65 61 53 74 | (pWE->t|smAreaSt|
|00001250| 61 72 74 20 3d 3d 20 6b | 49 6e 76 61 6c 69 64 4f |art == k|InvalidO|
|00001260| 66 66 73 65 74 29 0d 09 | 7b 0d 09 09 70 57 45 2d |ffset)..|{...pWE-|
|00001270| 3e 74 73 6d 41 72 65 61 | 53 74 61 72 74 20 3d 20 |>tsmArea|Start = |
|00001280| 70 57 45 2d 3e 73 65 6c | 53 74 61 72 74 3b 0d 09 |pWE->sel|Start;..|
|00001290| 09 70 57 45 2d 3e 74 73 | 6d 41 72 65 61 45 6e 64 |.pWE->ts|mAreaEnd|
|000012a0| 20 3d 20 70 57 45 2d 3e | 73 65 6c 45 6e 64 3b 0d | = pWE->|selEnd;.|
|000012b0| 0d 09 09 2f 2f 20 61 72 | 65 20 77 65 20 74 72 61 |...// ar|e we tra|
|000012c0| 63 6b 69 6e 67 20 61 20 | 74 79 70 69 6e 67 20 73 |cking a |typing s|
|000012d0| 65 71 75 65 6e 63 65 3f | 0d 09 09 69 66 20 28 21 |equence?|...if (!|
|000012e0| 57 45 49 73 54 79 70 69 | 6e 67 28 68 57 45 29 29 |WEIsTypi|ng(hWE))|
|000012f0| 0d 09 09 7b 0d 09 09 09 | 2f 2f 20 6e 6f 70 65 3b |...{....|// nope;|
|00001300| 20 73 6f 20 73 74 61 72 | 74 20 61 20 6e 65 77 20 | so star|t a new |
|00001310| 6f 6e 65 0d 09 09 09 2f | 2f 20 69 6e 63 72 65 6d |one..../|/ increm|
|00001320| 65 6e 74 20 6d 6f 64 69 | 66 69 63 61 74 69 6f 6e |ent modi|fication|
|00001330| 20 63 6f 75 6e 74 0d 09 | 09 09 70 57 45 2d 3e 6d | count..|..pWE->m|
|00001340| 6f 64 43 6f 75 6e 74 2b | 2b 3b 0d 0d 09 09 09 2f |odCount+|+;...../|
|00001350| 2f 20 69 66 20 75 6e 64 | 6f 20 73 75 70 70 6f 72 |/ if und|o suppor|
|00001360| 74 20 69 73 20 65 6e 61 | 62 6c 65 64 2c 20 74 68 |t is ena|bled, th|
|00001370| 65 20 69 6e 6c 69 6e 65 | 20 73 65 73 73 69 6f 6e |e inline| session|
|00001380| 20 6a 75 73 74 20 73 74 | 61 72 74 65 64 20 6d 61 | just st|arted ma|
|00001390| 79 20 69 6e 69 74 69 61 | 74 65 0d 09 09 09 69 66 |y initia|te....if|
|000013a0| 20 28 42 54 53 54 28 70 | 57 45 2d 3e 66 65 61 74 | (BTST(p|WE->feat|
|000013b0| 75 72 65 73 2c 20 77 65 | 46 55 6e 64 6f 29 29 0d |ures, we|FUndo)).|
|000013c0| 09 09 09 7b 0d 09 09 09 | 09 57 45 43 6c 65 61 72 |...{....|.WEClear|
|000013d0| 55 6e 64 6f 28 68 57 45 | 29 3b 0d 09 09 09 09 69 |Undo(hWE|);.....i|
|000013e0| 66 20 28 5f 57 45 4e 65 | 77 41 63 74 69 6f 6e 28 |f (_WENe|wAction(|
|000013f0| 70 57 45 2d 3e 73 65 6c | 53 74 61 72 74 2c 20 70 |pWE->sel|Start, p|
|00001400| 57 45 2d 3e 73 65 6c 45 | 6e 64 2c 20 30 2c 20 77 |WE->selE|nd, 0, w|
|00001410| 65 41 4b 54 79 70 69 6e | 67 2c 20 30 2c 20 68 57 |eAKTypin|g, 0, hW|
|00001420| 45 2c 20 26 68 41 63 74 | 69 6f 6e 29 20 3d 3d 20 |E, &hAct|ion) == |
|00001430| 6e 6f 45 72 72 29 0d 09 | 09 09 09 7b 0d 09 09 09 |noErr)..|...{....|
|00001440| 09 09 5f 57 45 50 75 73 | 68 41 63 74 69 6f 6e 28 |.._WEPus|hAction(|
|00001450| 68 41 63 74 69 6f 6e 29 | 3b 0d 09 09 09 09 7d 0d |hAction)|;.....}.|
|00001460| 09 09 09 7d 0d 09 09 7d | 0d 09 7d 0d 0d 09 74 73 |...}...}|..}...ts|
|00001470| 6d 4f 66 66 73 65 74 20 | 3d 20 70 57 45 2d 3e 74 |mOffset |= pWE->t|
|00001480| 73 6d 41 72 65 61 53 74 | 61 72 74 3b 0d 0d 09 2f |smAreaSt|art;.../|
|00001490| 2f 20 74 68 65 20 6e 65 | 77 20 74 65 78 74 20 72 |/ the ne|w text r|
|000014a0| 65 70 6c 61 63 65 73 20 | 77 68 61 74 65 76 65 72 |eplaces |whatever|
|000014b0| 20 69 73 20 69 6e 20 74 | 68 65 20 61 63 74 69 76 | is in t|he activ|
|000014c0| 65 20 69 6e 70 75 74 20 | 61 72 65 61 0d 09 69 66 |e input |area..if|
|000014d0| 20 28 28 65 72 72 20 3d | 20 5f 57 45 44 65 6c 65 | ((err =| _WEDele|
|000014e0| 74 65 52 61 6e 67 65 28 | 74 73 6d 4f 66 66 73 65 |teRange(|tsmOffse|
|000014f0| 74 2c 20 70 57 45 2d 3e | 74 73 6d 41 72 65 61 45 |t, pWE->|tsmAreaE|
|00001500| 6e 64 2c 20 68 57 45 29 | 29 20 21 3d 20 6e 6f 45 |nd, hWE)|) != noE|
|00001510| 72 72 29 0d 09 7b 0d 09 | 09 67 6f 74 6f 20 63 6c |rr)..{..|.goto cl|
|00001520| 65 61 6e 75 70 3b 0d 09 | 7d 0d 0d 09 2f 2f 20 73 |eanup;..|}...// s|
|00001530| 79 6e 63 68 72 6f 6e 69 | 7a 65 20 74 68 65 20 6e |ynchroni|ze the n|
|00001540| 75 6c 6c 20 73 74 79 6c | 65 2c 20 73 6f 20 66 6f |ull styl|e, so fo|
|00001550| 6e 74 20 73 63 72 69 70 | 74 20 6d 61 74 63 68 65 |nt scrip|t matche|
|00001560| 73 20 74 68 65 20 6b 65 | 79 62 6f 61 72 64 20 73 |s the ke|yboard s|
|00001570| 63 72 69 70 74 0d 09 5f | 57 45 53 79 6e 63 68 4e |cript.._|WESynchN|
|00001580| 75 6c 6c 53 74 79 6c 65 | 28 68 57 45 29 3b 0d 0d |ullStyle|(hWE);..|
|00001590| 09 2f 2f 20 73 65 74 20 | 74 68 65 20 70 6f 72 74 |.// set |the port|
|000015a0| 20 66 6f 6e 74 20 66 6f | 72 20 67 6f 6f 64 20 6d | font fo|r good m|
|000015b0| 65 61 73 75 72 65 0d 09 | 47 65 74 50 6f 72 74 28 |easure..|GetPort(|
|000015c0| 26 73 61 76 65 50 6f 72 | 74 29 3b 0d 09 53 65 74 |&savePor|t);..Set|
|000015d0| 50 6f 72 74 28 70 57 45 | 2d 3e 70 6f 72 74 29 3b |Port(pWE|->port);|
|000015e0| 0d 09 54 65 78 74 46 6f | 6e 74 28 70 57 45 2d 3e |..TextFo|nt(pWE->|
|000015f0| 6e 75 6c 6c 53 74 79 6c | 65 2e 72 75 6e 53 74 79 |nullStyl|e.runSty|
|00001600| 6c 65 2e 74 73 46 6f 6e | 74 29 3b 0d 09 53 65 74 |le.tsFon|t);..Set|
|00001610| 50 6f 72 74 28 73 61 76 | 65 50 6f 72 74 29 3b 0d |Port(sav|ePort);.|
|00001620| 0d 09 2f 2f 20 69 6e 73 | 65 72 74 20 74 68 65 20 |..// ins|ert the |
|00001630| 74 65 78 74 0d 23 69 66 | 20 4f 50 41 51 55 45 5f |text.#if| OPAQUE_|
|00001640| 54 4f 4f 4c 42 4f 58 5f | 53 54 52 55 43 54 53 0d |TOOLBOX_|STRUCTS.|
|00001650| 09 7b 0d 09 09 76 6f 69 | 64 20 2a 74 65 78 74 44 |.{...voi|d *textD|
|00001660| 61 74 61 20 3d 20 4e 55 | 4c 4c 3b 0d 09 09 53 69 |ata = NU|LL;...Si|
|00001670| 7a 65 20 74 65 78 74 44 | 61 74 61 53 69 7a 65 20 |ze textD|ataSize |
|00001680| 3d 20 41 45 47 65 74 44 | 65 73 63 44 61 74 61 53 |= AEGetD|escDataS|
|00001690| 69 7a 65 28 26 74 65 78 | 74 29 3b 0d 09 09 69 66 |ize(&tex|t);...if|
|000016a0| 20 28 74 65 78 74 44 61 | 74 61 53 69 7a 65 20 3e | (textDa|taSize >|
|000016b0| 20 30 29 0d 09 09 7b 0d | 09 09 09 74 65 78 74 44 | 0)...{.|...textD|
|000016c0| 61 74 61 20 3d 20 4e 65 | 77 50 74 72 43 6c 65 61 |ata = Ne|wPtrClea|
|000016d0| 72 28 74 65 78 74 44 61 | 74 61 53 69 7a 65 29 3b |r(textDa|taSize);|
|000016e0| 0d 09 09 09 69 66 20 28 | 74 65 78 74 44 61 74 61 |....if (|textData|
|000016f0| 29 0d 09 09 09 7b 0d 09 | 09 09 09 69 66 20 28 41 |)....{..|...if (A|
|00001700| 45 47 65 74 44 65 73 63 | 44 61 74 61 28 26 74 65 |EGetDesc|Data(&te|
|00001710| 78 74 2c 20 74 65 78 74 | 44 61 74 61 2c 20 74 65 |xt, text|Data, te|
|00001720| 78 74 44 61 74 61 53 69 | 7a 65 29 20 3d 3d 20 6e |xtDataSi|ze) == n|
|00001730| 6f 45 72 72 29 0d 09 09 | 09 09 7b 0d 09 09 09 09 |oErr)...|..{.....|
|00001740| 09 65 72 72 20 3d 20 5f | 57 45 49 6e 73 65 72 74 |.err = _|WEInsert|
|00001750| 54 65 78 74 28 74 73 6d | 4f 66 66 73 65 74 2c 20 |Text(tsm|Offset, |
|00001760| 74 65 78 74 44 61 74 61 | 2c 20 74 6f 74 61 6c 4c |textData|, totalL|
|00001770| 65 6e 67 74 68 2c 20 68 | 57 45 29 3b 0d 09 09 09 |ength, h|WE);....|
|00001780| 09 7d 0d 09 09 09 09 44 | 69 73 70 6f 73 65 50 74 |.}.....D|isposePt|
|00001790| 72 28 74 65 78 74 44 61 | 74 61 29 3b 0d 09 09 09 |r(textDa|ta);....|
|000017a0| 7d 0d 09 09 7d 0d 09 7d | 0d 23 65 6c 73 65 0d 09 |}...}..}|.#else..|
|000017b0| 7b 0d 09 09 42 6f 6f 6c | 65 61 6e 20 73 61 76 65 |{...Bool|ean save|
|000017c0| 54 65 78 74 4c 6f 63 6b | 20 3d 20 5f 57 45 53 65 |TextLock| = _WESe|
|000017d0| 74 48 61 6e 64 6c 65 4c | 6f 63 6b 28 74 65 78 74 |tHandleL|ock(text|
|000017e0| 2e 64 61 74 61 48 61 6e | 64 6c 65 2c 20 74 72 75 |.dataHan|dle, tru|
|000017f0| 65 29 3b 0d 09 09 65 72 | 72 20 3d 20 5f 57 45 49 |e);...er|r = _WEI|
|00001800| 6e 73 65 72 74 54 65 78 | 74 28 74 73 6d 4f 66 66 |nsertTex|t(tsmOff|
|00001810| 73 65 74 2c 20 2a 28 74 | 65 78 74 2e 64 61 74 61 |set, *(t|ext.data|
|00001820| 48 61 6e 64 6c 65 29 2c | 20 74 6f 74 61 6c 4c 65 |Handle),| totalLe|
|00001830| 6e 67 74 68 2c 20 68 57 | 45 29 3b 0d 09 09 5f 57 |ngth, hW|E);..._W|
|00001840| 45 53 65 74 48 61 6e 64 | 6c 65 4c 6f 63 6b 28 74 |ESetHand|leLock(t|
|00001850| 65 78 74 2e 64 61 74 61 | 48 61 6e 64 6c 65 2c 20 |ext.data|Handle, |
|00001860| 73 61 76 65 54 65 78 74 | 4c 6f 63 6b 29 3b 0d 09 |saveText|Lock);..|
|00001870| 7d 0d 23 65 6e 64 69 66 | 0d 09 69 66 20 28 65 72 |}.#endif|..if (er|
|00001880| 72 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 7b 0d 09 |r != noE|rr)..{..|
|00001890| 09 67 6f 74 6f 20 63 6c | 65 61 6e 75 70 3b 0d 09 |.goto cl|eanup;..|
|000018a0| 7d 0d 0d 09 2f 2f 20 65 | 78 74 72 61 63 74 20 70 |}...// e|xtract p|
|000018b0| 69 6e 20 72 61 6e 67 65 | 0d 09 69 66 20 28 28 65 |in range|..if ((e|
|000018c0| 72 72 20 3d 20 41 45 47 | 65 74 50 61 72 61 6d 50 |rr = AEG|etParamP|
|000018d0| 74 72 28 61 65 2c 20 6b | 65 79 41 45 50 69 6e 52 |tr(ae, k|eyAEPinR|
|000018e0| 61 6e 67 65 2c 20 74 79 | 70 65 54 65 78 74 52 61 |ange, ty|peTextRa|
|000018f0| 6e 67 65 2c 20 26 61 63 | 74 75 61 6c 54 79 70 65 |nge, &ac|tualType|
|00001900| 2c 0d 09 09 09 26 70 69 | 6e 52 61 6e 67 65 2c 20 |,....&pi|nRange, |
|00001910| 73 69 7a 65 6f 66 28 70 | 69 6e 52 61 6e 67 65 29 |sizeof(p|inRange)|
|00001920| 2c 20 26 61 63 74 75 61 | 6c 53 69 7a 65 29 29 20 |, &actua|lSize)) |
|00001930| 3d 3d 20 6e 6f 45 72 72 | 29 0d 09 7b 0d 09 09 2f |== noErr|)..{.../|
|00001940| 2f 20 77 65 20 77 61 6e | 74 20 61 62 73 6f 6c 75 |/ we wan|t absolu|
|00001950| 74 65 20 6f 66 66 73 65 | 74 73 0d 09 09 70 69 6e |te offse|ts...pin|
|00001960| 52 61 6e 67 65 2e 66 53 | 74 61 72 74 20 2b 3d 20 |Range.fS|tart += |
|00001970| 74 73 6d 4f 66 66 73 65 | 74 3b 0d 09 09 70 69 6e |tsmOffse|t;...pin|
|00001980| 52 61 6e 67 65 2e 66 45 | 6e 64 20 2b 3d 20 74 73 |Range.fE|nd += ts|
|00001990| 6d 4f 66 66 73 65 74 3b | 0d 09 7d 0d 09 65 6c 73 |mOffset;|..}..els|
|000019a0| 65 0d 09 7b 0d 09 09 2f | 2f 20 61 20 6d 69 73 73 |e..{.../|/ a miss|
|000019b0| 69 6e 67 20 70 69 6e 20 | 72 61 6e 67 65 20 64 65 |ing pin |range de|
|000019c0| 73 63 72 69 70 74 6f 72 | 20 69 73 6e 27 74 20 61 |scriptor| isn't a|
|000019d0| 6e 20 65 72 72 6f 72 3b | 20 65 76 65 72 79 74 68 |n error;| everyth|
|000019e0| 69 6e 67 20 65 6c 73 65 | 20 69 73 0d 09 09 69 66 |ing else| is...if|
|000019f0| 20 28 65 72 72 20 21 3d | 20 65 72 72 41 45 44 65 | (err !=| errAEDe|
|00001a00| 73 63 4e 6f 74 46 6f 75 | 6e 64 29 0d 09 09 7b 0d |scNotFou|nd)...{.|
|00001a10| 09 09 09 67 6f 74 6f 20 | 63 6c 65 61 6e 75 70 3b |...goto |cleanup;|
|00001a20| 0d 09 09 7d 0d 0d 09 09 | 2f 2f 20 64 65 66 61 75 |...}....|// defau|
|00001a30| 6c 74 20 70 69 6e 20 72 | 61 6e 67 65 20 69 73 20 |lt pin r|ange is |
|00001a40| 61 63 74 69 76 65 20 69 | 6e 70 75 74 20 61 72 65 |active i|nput are|
|00001a50| 61 0d 09 09 70 69 6e 52 | 61 6e 67 65 2e 66 53 74 |a...pinR|ange.fSt|
|00001a60| 61 72 74 20 3d 20 74 73 | 6d 4f 66 66 73 65 74 3b |art = ts|mOffset;|
|00001a70| 0d 09 09 70 69 6e 52 61 | 6e 67 65 2e 66 45 6e 64 |...pinRa|nge.fEnd|
|00001a80| 20 3d 20 70 57 45 2d 3e | 74 73 6d 41 72 65 61 45 | = pWE->|tsmAreaE|
|00001a90| 6e 64 3b 0d 09 7d 0d 0d | 09 2f 2f 20 4e 4f 54 45 |nd;..}..|.// NOTE|
|00001aa0| 3a 20 69 66 20 66 69 78 | 4c 65 6e 67 74 68 20 3d |: if fix|Length =|
|00001ab0| 3d 20 74 6f 74 61 6c 4c | 65 6e 67 74 68 2c 20 74 |= totalL|ength, t|
|00001ac0| 68 65 20 69 6e 6c 69 6e | 65 20 69 6e 70 75 74 20 |he inlin|e input |
|00001ad0| 73 65 73 73 69 6f 6e 20 | 69 73 20 6f 76 65 72 2c |session |is over,|
|00001ae0| 20 73 6f 2c 20 69 6e 20 | 74 68 65 6f 72 79 2c 0d | so, in |theory,.|
|00001af0| 09 2f 2f 20 68 69 6c 69 | 74 65 54 72 61 79 20 73 |.// hili|teTray s|
|00001b00| 68 6f 75 6c 64 20 65 69 | 74 68 65 72 20 62 65 20 |hould ei|ther be |
|00001b10| 6d 69 73 73 69 6e 67 20 | 6f 72 20 6e 6f 74 20 73 |missing |or not s|
|00001b20| 70 65 63 69 66 79 20 61 | 6e 79 20 72 61 6e 67 65 |pecify a|ny range|
|00001b30| 20 74 6f 20 62 65 20 75 | 6e 64 65 72 6c 69 6e 65 | to be u|nderline|
|00001b40| 64 2e 0d 09 2f 2f 20 55 | 6e 66 6f 72 74 75 6e 61 |d...// U|nfortuna|
|00001b50| 74 65 6c 79 2c 20 73 6f | 6d 65 20 69 6e 70 75 74 |tely, so|me input|
|00001b60| 20 6d 65 74 68 6f 64 73 | 20 28 6c 69 6b 65 20 41 | methods| (like A|
|00001b70| 70 70 6c 65 27 73 20 69 | 6e 70 75 74 20 6d 65 74 |pple's i|nput met|
|00001b80| 68 6f 64 20 66 6f 72 20 | 53 69 6d 70 6c 69 66 69 |hod for |Simplifi|
|00001b90| 65 64 20 43 68 69 6e 65 | 73 65 29 0d 09 2f 2f 20 |ed Chine|se)..// |
|00001ba0| 64 6f 20 73 70 65 63 69 | 66 79 20 6b 43 6f 6e 76 |do speci|fy kConv|
|00001bb0| 65 72 74 65 64 54 65 78 | 74 20 28 3d 20 74 68 69 |ertedTex|t (= thi|
|00001bc0| 6e 20 62 6c 61 63 6b 20 | 75 6e 64 65 72 6c 69 6e |n black |underlin|
|00001bd0| 65 29 20 66 6f 72 20 74 | 68 65 20 77 68 6f 6c 65 |e) for t|he whole|
|00001be0| 20 74 65 78 74 20 77 68 | 65 6e 0d 09 2f 2f 20 74 | text wh|en..// t|
|00001bf0| 68 65 20 74 65 78 74 20 | 69 73 20 63 6f 6e 66 69 |he text |is confi|
|00001c00| 72 6d 65 64 20 28 69 73 | 20 74 68 69 73 20 61 20 |rmed (is| this a |
|00001c10| 62 75 67 3f 29 2e 20 20 | 54 6f 20 77 6f 72 6b 20 |bug?). |To work |
|00001c20| 61 72 6f 75 6e 64 20 74 | 68 69 73 2c 20 77 65 20 |around t|his, we |
|00001c30| 64 65 6c 69 62 65 72 61 | 74 65 6c 79 20 69 67 6e |delibera|tely ign|
|00001c40| 6f 72 65 0d 09 2f 2f 20 | 74 68 65 20 68 69 6c 69 |ore..// |the hili|
|00001c50| 74 65 54 72 61 79 20 70 | 61 72 61 6d 65 74 65 72 |teTray p|arameter|
|00001c60| 20 77 68 65 6e 20 66 69 | 78 4c 65 6e 67 74 68 20 | when fi|xLength |
|00001c70| 3d 20 74 6f 74 61 6c 4c | 65 6e 67 74 68 2e 0d 0d |= totalL|ength...|
|00001c80| 09 69 66 20 28 66 69 78 | 4c 65 6e 67 74 68 20 21 |.if (fix|Length !|
|00001c90| 3d 20 74 6f 74 61 6c 4c | 65 6e 67 74 68 29 0d 09 |= totalL|ength)..|
|00001ca0| 7b 0d 09 09 70 57 45 2d | 3e 74 73 6d 41 72 65 61 |{...pWE-|>tsmArea|
|00001cb0| 53 74 61 72 74 20 2b 3d | 20 66 69 78 4c 65 6e 67 |Start +=| fixLeng|
|00001cc0| 74 68 3b 20 20 2f 2f 20 | 61 64 64 65 64 20 62 79 |th; // |added by|
|00001cd0| 20 4b 69 79 6f 73 68 69 | 20 47 6f 6d 61 73 61 6b | Kiyoshi| Gomasak|
|00001ce0| 69 20 66 6f 72 20 41 54 | 4f 4b 20 63 6f 6d 70 61 |i for AT|OK compa|
|00001cf0| 74 69 62 69 6c 69 74 79 | 0d 0d 09 09 2f 2f 20 65 |tibility|....// e|
|00001d00| 78 74 72 61 63 74 20 74 | 68 65 20 68 69 67 68 6c |xtract t|he highl|
|00001d10| 69 67 68 74 20 72 61 6e | 67 65 20 61 72 72 61 79 |ight ran|ge array|
|00001d20| 0d 09 09 69 66 20 28 28 | 65 72 72 20 3d 20 41 45 |...if ((|err = AE|
|00001d30| 47 65 74 50 61 72 61 6d | 44 65 73 63 28 61 65 2c |GetParam|Desc(ae,|
|00001d40| 20 6b 65 79 41 45 48 69 | 6c 69 74 65 52 61 6e 67 | keyAEHi|liteRang|
|00001d50| 65 2c 20 74 79 70 65 54 | 65 78 74 52 61 6e 67 65 |e, typeT|extRange|
|00001d60| 41 72 72 61 79 2c 20 26 | 68 69 6c 69 74 65 54 72 |Array, &|hiliteTr|
|00001d70| 61 79 29 29 20 21 3d 20 | 6e 6f 45 72 72 29 0d 09 |ay)) != |noErr)..|
|00001d80| 09 7b 0d 09 09 09 69 66 | 20 28 65 72 72 20 21 3d |.{....if| (err !=|
|00001d90| 20 65 72 72 41 45 44 65 | 73 63 4e 6f 74 46 6f 75 | errAEDe|scNotFou|
|00001da0| 6e 64 29 0d 09 09 09 7b | 0d 09 09 09 09 67 6f 74 |nd)....{|.....got|
|00001db0| 6f 20 63 6c 65 61 6e 75 | 70 3b 0d 09 09 09 7d 0d |o cleanu|p;....}.|
|00001dc0| 09 09 7d 0d 09 7d 0d 0d | 09 69 66 20 28 68 69 6c |..}..}..|.if (hil|
|00001dd0| 69 74 65 54 72 61 79 2e | 64 61 74 61 48 61 6e 64 |iteTray.|dataHand|
|00001de0| 6c 65 20 21 3d 20 6e 69 | 6c 29 0d 09 7b 0d 09 09 |le != ni|l)..{...|
|00001df0| 69 66 20 28 28 65 72 72 | 20 3d 20 5f 57 45 48 69 |if ((err| = _WEHi|
|00001e00| 6c 69 74 65 52 61 6e 67 | 65 41 72 72 61 79 28 28 |liteRang|eArray((|
|00001e10| 54 65 78 74 52 61 6e 67 | 65 41 72 72 61 79 48 61 |TextRang|eArrayHa|
|00001e20| 6e 64 6c 65 29 20 68 69 | 6c 69 74 65 54 72 61 79 |ndle) hi|liteTray|
|00001e30| 2e 64 61 74 61 48 61 6e | 64 6c 65 2c 20 68 57 45 |.dataHan|dle, hWE|
|00001e40| 29 29 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 09 7b |)) != no|Err)...{|
|00001e50| 0d 09 09 09 67 6f 74 6f | 20 63 6c 65 61 6e 75 70 |....goto| cleanup|
|00001e60| 3b 0d 09 09 7d 0d 09 7d | 0d 09 65 6c 73 65 0d 09 |;...}..}|..else..|
|00001e70| 7b 0d 09 09 70 57 45 2d | 3e 73 65 6c 53 74 61 72 |{...pWE-|>selStar|
|00001e80| 74 20 3d 20 74 73 6d 4f | 66 66 73 65 74 20 2b 20 |t = tsmO|ffset + |
|00001e90| 66 69 78 4c 65 6e 67 74 | 68 3b 0d 09 09 70 57 45 |fixLengt|h;...pWE|
|00001ea0| 2d 3e 73 65 6c 45 6e 64 | 20 3d 20 70 57 45 2d 3e |->selEnd| = pWE->|
|00001eb0| 73 65 6c 53 74 61 72 74 | 3b 0d 09 7d 0d 0d 09 2f |selStart|;..}.../|
|00001ec0| 2f 20 74 65 6d 70 6f 72 | 61 72 69 6c 79 20 64 69 |/ tempor|arily di|
|00001ed0| 73 61 62 6c 65 20 61 75 | 74 6f 2d 73 63 72 6f 6c |sable au|to-scrol|
|00001ee0| 6c 2c 20 61 73 20 77 65 | 20 6e 65 65 64 20 74 6f |l, as we| need to|
|00001ef0| 20 73 63 72 6f 6c 6c 20 | 6d 61 6e 75 61 6c 6c 79 | scroll |manually|
|00001f00| 20 61 63 63 6f 72 64 69 | 6e 67 20 74 6f 20 70 69 | accordi|ng to pi|
|00001f10| 6e 52 61 6e 67 65 0d 09 | 73 61 76 65 41 75 74 6f |nRange..|saveAuto|
|00001f20| 53 63 72 6f 6c 6c 20 3d | 20 42 54 53 54 28 70 57 |Scroll =| BTST(pW|
|00001f30| 45 2d 3e 66 65 61 74 75 | 72 65 73 2c 20 77 65 46 |E->featu|res, weF|
|00001f40| 41 75 74 6f 53 63 72 6f | 6c 6c 29 20 3f 20 74 72 |AutoScro|ll) ? tr|
|00001f50| 75 65 20 3a 20 66 61 6c | 73 65 3b 0d 09 42 43 4c |ue : fal|se;..BCL|
|00001f60| 52 28 70 57 45 2d 3e 66 | 65 61 74 75 72 65 73 2c |R(pWE->f|eatures,|
|00001f70| 20 77 65 46 41 75 74 6f | 53 63 72 6f 6c 6c 29 3b | weFAuto|Scroll);|
|00001f80| 0d 0d 09 2f 2f 20 72 65 | 64 72 61 77 20 74 68 65 |...// re|draw the|
|00001f90| 20 61 63 74 69 76 65 20 | 69 6e 70 75 74 20 61 72 | active |input ar|
|00001fa0| 65 61 0d 09 69 66 20 28 | 28 65 72 72 20 3d 20 5f |ea..if (|(err = _|
|00001fb0| 57 45 52 65 64 72 61 77 | 28 74 73 6d 4f 66 66 73 |WERedraw|(tsmOffs|
|00001fc0| 65 74 2c 20 74 73 6d 4f | 66 66 73 65 74 20 2b 20 |et, tsmO|ffset + |
|00001fd0| 74 6f 74 61 6c 4c 65 6e | 67 74 68 2c 20 68 57 45 |totalLen|gth, hWE|
|00001fe0| 29 29 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 7b 0d |)) != no|Err)..{.|
|00001ff0| 09 09 67 6f 74 6f 20 63 | 6c 65 61 6e 75 70 3b 0d |..goto c|leanup;.|
|00002000| 09 7d 0d 0d 09 69 66 20 | 28 73 61 76 65 41 75 74 |.}...if |(saveAut|
|00002010| 6f 53 63 72 6f 6c 6c 29 | 0d 09 7b 0d 0d 09 09 2f |oScroll)|..{..../|
|00002020| 2f 20 72 65 2d 65 6e 61 | 62 6c 65 20 61 75 74 6f |/ re-ena|ble auto|
|00002030| 2d 73 63 72 6f 6c 6c 0d | 09 09 42 53 45 54 28 70 |-scroll.|..BSET(p|
|00002040| 57 45 2d 3e 66 65 61 74 | 75 72 65 73 2c 20 77 65 |WE->feat|ures, we|
|00002050| 46 41 75 74 6f 53 63 72 | 6f 6c 6c 29 3b 0d 0d 09 |FAutoScr|oll);...|
|00002060| 09 2f 2f 20 73 63 72 6f | 6c 6c 20 74 68 65 20 70 |.// scro|ll the p|
|00002070| 69 6e 20 72 61 6e 67 65 | 20 69 6e 74 6f 20 76 69 |in range| into vi|
|00002080| 65 77 0d 09 09 69 66 20 | 28 21 5f 57 45 53 63 72 |ew...if |(!_WEScr|
|00002090| 6f 6c 6c 49 6e 74 6f 56 | 69 65 77 28 70 69 6e 52 |ollIntoV|iew(pinR|
|000020a0| 61 6e 67 65 2e 66 53 74 | 61 72 74 2c 20 68 57 45 |ange.fSt|art, hWE|
|000020b0| 29 29 0d 09 09 7b 0d 09 | 09 09 69 66 20 28 70 69 |))...{..|..if (pi|
|000020c0| 6e 52 61 6e 67 65 2e 66 | 53 74 61 72 74 20 21 3d |nRange.f|Start !=|
|000020d0| 20 70 69 6e 52 61 6e 67 | 65 2e 66 45 6e 64 29 0d | pinRang|e.fEnd).|
|000020e0| 09 09 09 7b 0d 09 09 09 | 09 5f 57 45 53 63 72 6f |...{....|._WEScro|
|000020f0| 6c 6c 49 6e 74 6f 56 69 | 65 77 28 70 69 6e 52 61 |llIntoVi|ew(pinRa|
|00002100| 6e 67 65 2e 66 45 6e 64 | 2c 20 68 57 45 29 3b 0d |nge.fEnd|, hWE);.|
|00002110| 09 09 09 7d 0d 09 09 7d | 0d 09 7d 0d 0d 09 2f 2f |...}...}|..}...//|
|00002120| 20 75 70 64 61 74 65 20 | 74 68 65 20 62 6f 75 6e | update |the boun|
|00002130| 64 61 72 69 65 73 20 6f | 66 20 74 68 65 20 61 63 |daries o|f the ac|
|00002140| 74 69 76 65 20 69 6e 70 | 75 74 20 61 72 65 61 0d |tive inp|ut area.|
|00002150| 09 2f 2f 20 69 66 20 66 | 69 78 4c 65 6e 67 74 68 |.// if f|ixLength|
|00002160| 20 3d 20 74 6f 74 61 6c | 4c 65 6e 67 74 68 2c 20 | = total|Length, |
|00002170| 74 68 65 20 69 6e 6c 69 | 6e 65 20 69 6e 70 75 74 |the inli|ne input|
|00002180| 20 73 65 73 73 69 6f 6e | 20 69 73 20 6f 76 65 72 | session| is over|
|00002190| 3a 20 63 6c 6f 73 65 20 | 74 68 65 20 61 63 74 69 |: close |the acti|
|000021a0| 76 65 20 69 6e 70 75 74 | 20 61 72 65 61 0d 09 69 |ve input| area..i|
|000021b0| 66 20 28 66 69 78 4c 65 | 6e 67 74 68 20 3d 3d 20 |f (fixLe|ngth == |
|000021c0| 74 6f 74 61 6c 4c 65 6e | 67 74 68 29 0d 09 7b 0d |totalLen|gth)..{.|
|000021d0| 09 09 70 57 45 2d 3e 74 | 73 6d 41 72 65 61 53 74 |..pWE->t|smAreaSt|
|000021e0| 61 72 74 20 3d 20 6b 49 | 6e 76 61 6c 69 64 4f 66 |art = kI|nvalidOf|
|000021f0| 66 73 65 74 3b 0d 09 09 | 70 57 45 2d 3e 74 73 6d |fset;...|pWE->tsm|
|00002200| 41 72 65 61 45 6e 64 20 | 3d 20 6b 49 6e 76 61 6c |AreaEnd |= kInval|
|00002210| 69 64 4f 66 66 73 65 74 | 3b 0d 0d 09 09 2f 2f 20 |idOffset|;....// |
|00002220| 61 64 6a 75 73 74 20 75 | 6e 64 6f 20 62 75 66 66 |adjust u|ndo buff|
|00002230| 65 72 20 28 69 66 20 61 | 6e 79 29 20 66 6f 72 20 |er (if a|ny) for |
|00002240| 74 68 65 20 63 6f 6e 66 | 69 72 6d 65 64 20 74 65 |the conf|irmed te|
|00002250| 78 74 0d 09 09 5f 57 45 | 41 64 6a 75 73 74 55 6e |xt..._WE|AdjustUn|
|00002260| 64 6f 52 61 6e 67 65 28 | 66 69 78 4c 65 6e 67 74 |doRange(|fixLengt|
|00002270| 68 2c 20 68 57 45 29 3b | 0d 09 7d 0d 09 65 6c 73 |h, hWE);|..}..els|
|00002280| 65 0d 09 7b 0d 09 09 2f | 2f 20 6f 74 68 65 72 77 |e..{.../|/ otherw|
|00002290| 69 73 65 2c 20 66 69 78 | 4c 65 6e 67 74 68 20 64 |ise, fix|Length d|
|000022a0| 65 66 69 6e 65 73 20 74 | 68 65 20 62 6f 75 6e 64 |efines t|he bound|
|000022b0| 61 72 69 65 73 20 6f 66 | 20 74 68 65 20 61 63 74 |aries of| the act|
|000022c0| 69 76 65 20 69 6e 70 75 | 74 20 61 72 65 61 0d 09 |ive inpu|t area..|
|000022d0| 09 70 57 45 2d 3e 74 73 | 6d 41 72 65 61 53 74 61 |.pWE->ts|mAreaSta|
|000022e0| 72 74 20 3d 20 74 73 6d | 4f 66 66 73 65 74 20 2b |rt = tsm|Offset +|
|000022f0| 20 66 69 78 4c 65 6e 67 | 74 68 3b 0d 09 09 70 57 | fixLeng|th;...pW|
|00002300| 45 2d 3e 74 73 6d 41 72 | 65 61 45 6e 64 20 3d 20 |E->tsmAr|eaEnd = |
|00002310| 74 73 6d 4f 66 66 73 65 | 74 20 2b 20 74 6f 74 61 |tsmOffse|t + tota|
|00002320| 6c 4c 65 6e 67 74 68 3b | 0d 09 7d 0d 0d 09 2f 2f |lLength;|..}...//|
|00002330| 20 63 61 6c 6c 20 74 68 | 65 20 70 6f 73 74 2d 75 | call th|e post-u|
|00002340| 70 64 61 74 65 20 63 61 | 6c 6c 62 61 63 6b 2c 20 |pdate ca|llback, |
|00002350| 69 66 20 70 72 65 73 65 | 6e 74 0d 09 69 66 20 28 |if prese|nt..if (|
|00002360| 70 57 45 2d 3e 74 73 6d | 50 6f 73 74 55 70 64 61 |pWE->tsm|PostUpda|
|00002370| 74 65 20 21 3d 20 6e 69 | 6c 29 0d 09 7b 0d 09 09 |te != ni|l)..{...|
|00002380| 43 61 6c 6c 57 45 54 53 | 4d 50 6f 73 74 55 70 64 |CallWETS|MPostUpd|
|00002390| 61 74 65 50 72 6f 63 28 | 68 57 45 2c 20 66 69 78 |ateProc(|hWE, fix|
|000023a0| 4c 65 6e 67 74 68 2c 20 | 70 57 45 2d 3e 74 73 6d |Length, |pWE->tsm|
|000023b0| 41 72 65 61 53 74 61 72 | 74 2c 20 70 57 45 2d 3e |AreaStar|t, pWE->|
|000023c0| 74 73 6d 41 72 65 61 45 | 6e 64 2c 0d 09 09 09 70 |tsmAreaE|nd,....p|
|000023d0| 69 6e 52 61 6e 67 65 2e | 66 53 74 61 72 74 2c 20 |inRange.|fStart, |
|000023e0| 70 69 6e 52 61 6e 67 65 | 2e 66 45 6e 64 2c 20 70 |pinRange|.fEnd, p|
|000023f0| 57 45 2d 3e 74 73 6d 50 | 6f 73 74 55 70 64 61 74 |WE->tsmP|ostUpdat|
|00002400| 65 29 3b 0d 09 7d 0d 0d | 09 2f 2f 20 63 6c 65 61 |e);..}..|.// clea|
|00002410| 72 20 72 65 73 75 6c 74 | 20 63 6f 64 65 0d 09 65 |r result| code..e|
|00002420| 72 72 20 3d 20 6e 6f 45 | 72 72 3b 0d 0d 63 6c 65 |rr = noE|rr;..cle|
|00002430| 61 6e 75 70 3a 0d 09 2f | 2f 20 63 6c 65 61 6e 20 |anup:../|/ clean |
|00002440| 75 70 0d 09 41 45 44 69 | 73 70 6f 73 65 44 65 73 |up..AEDi|sposeDes|
|00002450| 63 28 26 74 65 78 74 29 | 3b 0d 09 41 45 44 69 73 |c(&text)|;..AEDis|
|00002460| 70 6f 73 65 44 65 73 63 | 28 26 68 69 6c 69 74 65 |poseDesc|(&hilite|
|00002470| 54 72 61 79 29 3b 0d 0d | 09 2f 2f 20 75 6e 6c 6f |Tray);..|.// unlo|
|00002480| 63 6b 20 74 68 65 20 57 | 45 20 72 65 63 6f 72 64 |ck the W|E record|
|00002490| 0d 09 69 66 20 28 68 57 | 45 20 21 3d 6e 69 6c 29 |..if (hW|E !=nil)|
|000024a0| 0d 09 7b 0d 09 09 5f 57 | 45 53 65 74 48 61 6e 64 |..{..._W|ESetHand|
|000024b0| 6c 65 4c 6f 63 6b 28 28 | 48 61 6e 64 6c 65 29 20 |leLock((|Handle) |
|000024c0| 68 57 45 2c 20 73 61 76 | 65 57 45 4c 6f 63 6b 29 |hWE, sav|eWELock)|
|000024d0| 3b 0d 09 7d 0d 0d 09 2f | 2f 20 72 65 74 75 72 6e |;..}.../|/ return|
|000024e0| 20 72 65 73 75 6c 74 20 | 63 6f 64 65 0d 09 72 65 | result |code..re|
|000024f0| 74 75 72 6e 20 65 72 72 | 3b 0d 7d 0d 0d 73 74 61 |turn err|;.}..sta|
|00002500| 74 69 63 20 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |tic pasc|al OSErr|
|00002510| 20 5f 57 45 48 61 6e 64 | 6c 65 50 6f 73 69 74 69 | _WEHand|lePositi|
|00002520| 6f 6e 54 6f 4f 66 66 73 | 65 74 28 63 6f 6e 73 74 |onToOffs|et(const|
|00002530| 20 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 61 65 2c | AppleEv|ent *ae,|
|00002540| 20 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 72 65 70 | AppleEv|ent *rep|
|00002550| 6c 79 2c 20 41 45 48 61 | 6e 64 6c 65 72 52 65 66 |ly, AEHa|ndlerRef|
|00002560| 63 6f 6e 20 68 61 6e 64 | 6c 65 72 52 65 66 43 6f |con hand|lerRefCo|
|00002570| 6e 29 0d 7b 0d 23 70 72 | 61 67 6d 61 20 75 6e 75 |n).{.#pr|agma unu|
|00002580| 73 65 64 28 68 61 6e 64 | 6c 65 72 52 65 66 43 6f |sed(hand|lerRefCo|
|00002590| 6e 29 0d 09 57 45 48 61 | 6e 64 6c 65 20 68 57 45 |n)..WEHa|ndle hWE|
|000025a0| 20 3d 20 6e 69 6c 3b 0d | 09 57 45 50 74 72 20 70 | = nil;.|.WEPtr p|
|000025b0| 57 45 3b 0d 09 50 6f 69 | 6e 74 20 70 6f 73 69 74 |WE;..Poi|nt posit|
|000025c0| 69 6f 6e 3b 0d 09 4c 6f | 6e 67 50 74 20 74 68 65 |ion;..Lo|ngPt the|
|000025d0| 50 6f 69 6e 74 3b 0d 09 | 53 49 6e 74 31 36 20 72 |Point;..|SInt16 r|
|000025e0| 65 67 69 6f 6e 43 6c 61 | 73 73 3b 0d 09 53 49 6e |egionCla|ss;..SIn|
|000025f0| 74 33 32 20 6f 66 66 73 | 65 74 3b 0d 09 44 65 73 |t32 offs|et;..Des|
|00002600| 63 54 79 70 65 20 61 63 | 74 75 61 6c 54 79 70 65 |cType ac|tualType|
|00002610| 3b 0d 09 53 49 6e 74 33 | 32 20 61 63 74 75 61 6c |;..SInt3|2 actual|
|00002620| 53 69 7a 65 3b 0d 09 47 | 72 61 66 50 74 72 20 73 |Size;..G|rafPtr s|
|00002630| 61 76 65 50 6f 72 74 3b | 0d 09 57 45 45 64 67 65 |avePort;|..WEEdge|
|00002640| 20 65 64 67 65 3b 0d 09 | 42 6f 6f 6c 65 61 6e 20 | edge;..|Boolean |
|00002650| 73 61 76 65 57 45 4c 6f | 63 6b 20 3d 20 66 61 6c |saveWELo|ck = fal|
|00002660| 73 65 3b 0d 09 4f 53 45 | 72 72 20 65 72 72 3b 0d |se;..OSE|rr err;.|
|00002670| 0d 09 2f 2f 20 65 78 74 | 72 61 63 74 20 57 45 20 |..// ext|ract WE |
|00002680| 68 61 6e 64 6c 65 0d 09 | 69 66 20 28 28 65 72 72 |handle..|if ((err|
|00002690| 20 3d 20 41 45 47 65 74 | 50 61 72 61 6d 50 74 72 | = AEGet|ParamPtr|
|000026a0| 28 61 65 2c 20 6b 65 79 | 41 45 54 53 4d 44 6f 63 |(ae, key|AETSMDoc|
|000026b0| 75 6d 65 6e 74 52 65 66 | 63 6f 6e 2c 20 74 79 70 |umentRef|con, typ|
|000026c0| 65 4c 6f 6e 67 49 6e 74 | 65 67 65 72 2c 0d 09 09 |eLongInt|eger,...|
|000026d0| 09 26 61 63 74 75 61 6c | 54 79 70 65 2c 20 26 68 |.&actual|Type, &h|
|000026e0| 57 45 2c 20 73 69 7a 65 | 6f 66 28 68 57 45 29 2c |WE, size|of(hWE),|
|000026f0| 20 26 61 63 74 75 61 6c | 53 69 7a 65 29 29 20 21 | &actual|Size)) !|
|00002700| 3d 20 6e 6f 45 72 72 29 | 0d 09 7b 0d 09 09 67 6f |= noErr)|..{...go|
|00002710| 74 6f 20 63 6c 65 61 6e | 75 70 3b 0d 09 7d 0d 0d |to clean|up;..}..|
|00002720| 09 2f 2f 20 6c 6f 63 6b | 20 74 68 65 20 57 45 20 |.// lock| the WE |
|00002730| 72 65 63 6f 72 64 0d 09 | 73 61 76 65 57 45 4c 6f |record..|saveWELo|
|00002740| 63 6b 20 3d 20 5f 57 45 | 53 65 74 48 61 6e 64 6c |ck = _WE|SetHandl|
|00002750| 65 4c 6f 63 6b 28 28 48 | 61 6e 64 6c 65 29 20 68 |eLock((H|andle) h|
|00002760| 57 45 2c 20 74 72 75 65 | 29 3b 0d 09 70 57 45 20 |WE, true|);..pWE |
|00002770| 3d 20 2a 68 57 45 3b 0d | 0d 09 2f 2f 20 65 78 74 |= *hWE;.|..// ext|
|00002780| 72 61 63 74 20 70 6f 73 | 69 74 69 6f 6e 20 70 61 |ract pos|ition pa|
|00002790| 72 61 6d 65 74 65 72 0d | 09 69 66 20 28 28 65 72 |rameter.|.if ((er|
|000027a0| 72 20 3d 20 41 45 47 65 | 74 50 61 72 61 6d 50 74 |r = AEGe|tParamPt|
|000027b0| 72 28 61 65 2c 20 6b 65 | 79 41 45 43 75 72 72 65 |r(ae, ke|yAECurre|
|000027c0| 6e 74 50 6f 69 6e 74 2c | 20 74 79 70 65 51 44 50 |ntPoint,| typeQDP|
|000027d0| 6f 69 6e 74 2c 20 26 61 | 63 74 75 61 6c 54 79 70 |oint, &a|ctualTyp|
|000027e0| 65 2c 20 26 70 6f 73 69 | 74 69 6f 6e 2c 20 73 69 |e, &posi|tion, si|
|000027f0| 7a 65 6f 66 28 70 6f 73 | 69 74 69 6f 6e 29 2c 20 |zeof(pos|ition), |
|00002800| 26 61 63 74 75 61 6c 53 | 69 7a 65 29 29 20 21 3d |&actualS|ize)) !=|
|00002810| 20 6e 6f 45 72 72 29 0d | 09 7b 0d 09 09 09 67 6f | noErr).|.{....go|
|00002820| 74 6f 20 63 6c 65 61 6e | 75 70 3b 0d 09 7d 0d 0d |to clean|up;..}..|
|00002830| 09 2f 2f 20 63 6f 6e 76 | 65 72 74 20 70 6f 73 69 |.// conv|ert posi|
|00002840| 74 69 6f 6e 20 74 6f 20 | 6c 6f 63 61 6c 2e 2e 2e |tion to |local...|
|00002850| 0d 09 47 65 74 50 6f 72 | 74 28 26 73 61 76 65 50 |..GetPor|t(&saveP|
|00002860| 6f 72 74 29 3b 0d 09 53 | 65 74 50 6f 72 74 28 70 |ort);..S|etPort(p|
|00002870| 57 45 2d 3e 70 6f 72 74 | 29 3b 0d 09 47 6c 6f 62 |WE->port|);..Glob|
|00002880| 61 6c 54 6f 4c 6f 63 61 | 6c 28 26 70 6f 73 69 74 |alToLoca|l(&posit|
|00002890| 69 6f 6e 29 3b 0d 09 53 | 65 74 50 6f 72 74 28 73 |ion);..S|etPort(s|
|000028a0| 61 76 65 50 6f 72 74 29 | 3b 0d 0d 09 2f 2f 20 2e |avePort)|;...// .|
|000028b0| 2e 2e 61 6e 64 20 6c 6f | 6e 67 20 63 6f 6f 72 64 |..and lo|ng coord|
|000028c0| 69 6e 61 74 65 73 0d 09 | 57 45 50 6f 69 6e 74 54 |inates..|WEPointT|
|000028d0| 6f 4c 6f 6e 67 50 6f 69 | 6e 74 28 70 6f 73 69 74 |oLongPoi|nt(posit|
|000028e0| 69 6f 6e 2c 20 26 74 68 | 65 50 6f 69 6e 74 29 3b |ion, &th|ePoint);|
|000028f0| 0d 0d 09 2f 2f 20 66 69 | 6e 64 20 74 68 65 20 62 |...// fi|nd the b|
|00002900| 79 74 65 20 6f 66 66 73 | 65 74 20 61 6e 64 20 74 |yte offs|et and t|
|00002910| 68 65 20 65 64 67 65 20 | 76 61 6c 75 65 20 63 6f |he edge |value co|
|00002920| 72 72 65 73 70 6f 6e 64 | 69 6e 67 20 74 6f 20 74 |rrespond|ing to t|
|00002930| 68 65 20 67 69 76 65 6e | 20 70 6f 73 69 74 69 6f |he given| positio|
|00002940| 6e 0d 09 6f 66 66 73 65 | 74 20 3d 20 57 45 47 65 |n..offse|t = WEGe|
|00002950| 74 4f 66 66 73 65 74 28 | 26 74 68 65 50 6f 69 6e |tOffset(|&thePoin|
|00002960| 74 2c 20 26 65 64 67 65 | 2c 20 68 57 45 29 3b 0d |t, &edge|, hWE);.|
|00002970| 0d 09 2f 2f 20 64 65 74 | 65 72 6d 69 6e 65 20 74 |..// det|ermine t|
|00002980| 68 65 20 72 65 67 69 6f | 6e 20 63 6c 61 73 73 0d |he regio|n class.|
|00002990| 09 69 66 20 28 57 45 4c | 6f 6e 67 50 6f 69 6e 74 |.if (WEL|ongPoint|
|000029a0| 49 6e 4c 6f 6e 67 52 65 | 63 74 28 26 74 68 65 50 |InLongRe|ct(&theP|
|000029b0| 6f 69 6e 74 2c 20 26 70 | 57 45 2d 3e 76 69 65 77 |oint, &p|WE->view|
|000029c0| 52 65 63 74 29 29 0d 09 | 7b 0d 09 09 69 66 20 28 |Rect))..|{...if (|
|000029d0| 5f 57 45 4f 66 66 73 65 | 74 49 6e 52 61 6e 67 65 |_WEOffse|tInRange|
|000029e0| 28 6f 66 66 73 65 74 2c | 20 65 64 67 65 2c 20 70 |(offset,| edge, p|
|000029f0| 57 45 2d 3e 74 73 6d 41 | 72 65 61 53 74 61 72 74 |WE->tsmA|reaStart|
|00002a00| 2c 20 70 57 45 2d 3e 74 | 73 6d 41 72 65 61 45 6e |, pWE->t|smAreaEn|
|00002a10| 64 29 29 0d 09 09 7b 0d | 20 20 09 09 09 72 65 67 |d))...{.| ...reg|
|00002a20| 69 6f 6e 43 6c 61 73 73 | 20 3d 20 6b 54 53 4d 49 |ionClass| = kTSMI|
|00002a30| 6e 73 69 64 65 4f 66 41 | 63 74 69 76 65 49 6e 70 |nsideOfA|ctiveInp|
|00002a40| 75 74 41 72 65 61 3b 0d | 09 09 09 2f 2f 20 69 66 |utArea;.|...// if|
|00002a50| 20 74 68 65 20 67 69 76 | 65 6e 20 70 6f 73 69 74 | the giv|en posit|
|00002a60| 69 6f 6e 20 69 73 20 77 | 69 74 68 69 6e 20 74 68 |ion is w|ithin th|
|00002a70| 65 20 61 63 74 69 76 65 | 20 69 6e 70 75 74 20 61 |e active| input a|
|00002a80| 72 65 61 2c 20 77 65 27 | 72 65 20 73 75 70 70 6f |rea, we'|re suppo|
|00002a90| 73 65 64 20 74 6f 20 72 | 65 74 75 72 6e 0d 09 09 |sed to r|eturn...|
|00002aa0| 09 2f 2f 20 61 6e 20 6f | 66 66 73 65 74 20 72 65 |.// an o|ffset re|
|00002ab0| 6c 61 74 69 76 65 20 74 | 6f 20 74 68 65 20 62 65 |lative t|o the be|
|00002ac0| 67 69 6e 6e 69 6e 67 20 | 6f 66 20 74 68 69 73 20 |ginning |of this |
|00002ad0| 61 72 65 61 20 28 74 68 | 61 6e 6b 73 2c 20 4d 61 |area (th|anks, Ma|
|00002ae0| 72 74 69 6e 21 29 0d 20 | 20 20 20 20 20 20 20 09 |rtin!). | .|
|00002af0| 6f 66 66 73 65 74 20 2d | 3d 20 70 57 45 2d 3e 74 |offset -|= pWE->t|
|00002b00| 73 6d 41 72 65 61 53 74 | 61 72 74 3b 0d 09 09 7d |smAreaSt|art;...}|
|00002b10| 0d 09 09 65 6c 73 65 0d | 09 09 7b 0d 09 09 09 2f |...else.|..{..../|
|00002b20| 2f 20 6f 74 68 65 72 77 | 69 73 65 20 74 68 65 20 |/ otherw|ise the |
|00002b30| 6f 66 66 73 65 74 20 69 | 73 20 72 65 6c 61 74 69 |offset i|s relati|
|00002b40| 76 65 20 74 6f 20 74 68 | 65 20 62 65 67 69 6e 6e |ve to th|e beginn|
|00002b50| 69 6e 67 20 6f 66 20 74 | 68 65 20 62 6f 64 79 0d |ing of t|he body.|
|00002b60| 09 09 09 72 65 67 69 6f | 6e 43 6c 61 73 73 20 3d |...regio|nClass =|
|00002b70| 20 6b 54 53 4d 49 6e 73 | 69 64 65 4f 66 42 6f 64 | kTSMIns|ideOfBod|
|00002b80| 79 3b 0d 09 09 7d 0d 09 | 7d 0d 09 65 6c 73 65 0d |y;...}..|}..else.|
|00002b90| 09 7b 0d 09 09 72 65 67 | 69 6f 6e 43 6c 61 73 73 |.{...reg|ionClass|
|00002ba0| 20 3d 20 6b 54 53 4d 4f | 75 74 73 69 64 65 4f 66 | = kTSMO|utsideOf|
|00002bb0| 42 6f 64 79 3b 0d 09 7d | 0d 0d 09 2f 2f 20 61 64 |Body;..}|...// ad|
|00002bc0| 64 20 72 65 67 69 6f 6e | 20 63 6c 61 73 73 20 70 |d region| class p|
|00002bd0| 61 72 61 6d 65 74 65 72 | 20 74 6f 20 72 65 70 6c |arameter| to repl|
|00002be0| 79 0d 09 69 66 20 28 28 | 65 72 72 20 3d 20 41 45 |y..if ((|err = AE|
|00002bf0| 50 75 74 50 61 72 61 6d | 50 74 72 28 72 65 70 6c |PutParam|Ptr(repl|
|00002c00| 79 2c 20 6b 65 79 41 45 | 52 65 67 69 6f 6e 43 6c |y, keyAE|RegionCl|
|00002c10| 61 73 73 2c 20 74 79 70 | 65 53 68 6f 72 74 49 6e |ass, typ|eShortIn|
|00002c20| 74 65 67 65 72 2c 20 26 | 72 65 67 69 6f 6e 43 6c |teger, &|regionCl|
|00002c30| 61 73 73 2c 20 73 69 7a | 65 6f 66 28 72 65 67 69 |ass, siz|eof(regi|
|00002c40| 6f 6e 43 6c 61 73 73 29 | 29 29 20 21 3d 20 6e 6f |onClass)|)) != no|
|00002c50| 45 72 72 29 0d 09 7b 0d | 09 09 67 6f 74 6f 20 63 |Err)..{.|..goto c|
|00002c60| 6c 65 61 6e 75 70 3b 0d | 09 7d 0d 0d 09 2f 2f 20 |leanup;.|.}...// |
|00002c70| 61 64 64 20 6f 66 66 73 | 65 74 20 70 61 72 61 6d |add offs|et param|
|00002c80| 65 74 65 72 20 74 6f 20 | 72 65 70 6c 79 0d 09 69 |eter to |reply..i|
|00002c90| 66 20 28 28 65 72 72 20 | 3d 20 41 45 50 75 74 50 |f ((err |= AEPutP|
|00002ca0| 61 72 61 6d 50 74 72 28 | 72 65 70 6c 79 2c 20 6b |aramPtr(|reply, k|
|00002cb0| 65 79 41 45 4f 66 66 73 | 65 74 2c 20 74 79 70 65 |eyAEOffs|et, type|
|00002cc0| 4c 6f 6e 67 49 6e 74 65 | 67 65 72 2c 20 26 6f 66 |LongInte|ger, &of|
|00002cd0| 66 73 65 74 2c 20 73 69 | 7a 65 6f 66 28 6f 66 66 |fset, si|zeof(off|
|00002ce0| 73 65 74 29 29 29 20 21 | 3d 20 6e 6f 45 72 72 29 |set))) !|= noErr)|
|00002cf0| 0d 09 7b 0d 09 09 67 6f | 74 6f 20 63 6c 65 61 6e |..{...go|to clean|
|00002d00| 75 70 3b 0d 09 7d 0d 0d | 09 2f 2f 20 61 64 64 20 |up;..}..|.// add |
|00002d10| 65 64 67 65 20 70 61 72 | 61 6d 65 74 65 72 20 74 |edge par|ameter t|
|00002d20| 6f 20 72 65 70 6c 79 0d | 09 69 66 20 28 28 65 72 |o reply.|.if ((er|
|00002d30| 72 20 3d 20 41 45 50 75 | 74 50 61 72 61 6d 50 74 |r = AEPu|tParamPt|
|00002d40| 72 28 72 65 70 6c 79 2c | 20 6b 65 79 41 45 4c 65 |r(reply,| keyAELe|
|00002d50| 66 74 53 69 64 65 2c 20 | 74 79 70 65 42 6f 6f 6c |ftSide, |typeBool|
|00002d60| 65 61 6e 2c 20 26 65 64 | 67 65 2c 20 73 69 7a 65 |ean, &ed|ge, size|
|00002d70| 6f 66 28 65 64 67 65 29 | 29 29 20 21 3d 20 6e 6f |of(edge)|)) != no|
|00002d80| 45 72 72 29 0d 09 7b 0d | 09 09 67 6f 74 6f 20 63 |Err)..{.|..goto c|
|00002d90| 6c 65 61 6e 75 70 3b 0d | 09 7d 0d 0d 09 2f 2f 20 |leanup;.|.}...// |
|00002da0| 63 6c 65 61 72 20 72 65 | 73 75 6c 74 20 63 6f 64 |clear re|sult cod|
|00002db0| 65 0d 09 65 72 72 20 3d | 20 6e 6f 45 72 72 3b 0d |e..err =| noErr;.|
|00002dc0| 0d 63 6c 65 61 6e 75 70 | 3a 0d 09 2f 2f 20 75 6e |.cleanup|:..// un|
|00002dd0| 6c 6f 63 6b 20 74 68 65 | 20 57 45 20 72 65 63 6f |lock the| WE reco|
|00002de0| 72 64 0d 09 69 66 20 28 | 68 57 45 20 21 3d 20 6e |rd..if (|hWE != n|
|00002df0| 69 6c 29 0d 09 7b 0d 09 | 09 5f 57 45 53 65 74 48 |il)..{..|._WESetH|
|00002e00| 61 6e 64 6c 65 4c 6f 63 | 6b 28 28 48 61 6e 64 6c |andleLoc|k((Handl|
|00002e10| 65 29 20 68 57 45 2c 20 | 73 61 76 65 57 45 4c 6f |e) hWE, |saveWELo|
|00002e20| 63 6b 29 3b 0d 09 7d 0d | 0d 09 2f 2f 20 72 65 74 |ck);..}.|..// ret|
|00002e30| 75 72 6e 20 72 65 73 75 | 6c 74 20 63 6f 64 65 0d |urn resu|lt code.|
|00002e40| 09 72 65 74 75 72 6e 20 | 65 72 72 3b 0d 7d 0d 0d |.return |err;.}..|
|00002e50| 73 74 61 74 69 63 20 70 | 61 73 63 61 6c 20 4f 53 |static p|ascal OS|
|00002e60| 45 72 72 20 5f 57 45 48 | 61 6e 64 6c 65 4f 66 66 |Err _WEH|andleOff|
|00002e70| 73 65 74 54 6f 50 6f 73 | 69 74 69 6f 6e 28 63 6f |setToPos|ition(co|
|00002e80| 6e 73 74 20 41 70 70 6c | 65 45 76 65 6e 74 20 2a |nst Appl|eEvent *|
|00002e90| 61 65 2c 20 41 70 70 6c | 65 45 76 65 6e 74 20 2a |ae, Appl|eEvent *|
|00002ea0| 72 65 70 6c 79 2c 20 41 | 45 48 61 6e 64 6c 65 72 |reply, A|EHandler|
|00002eb0| 52 65 66 63 6f 6e 20 68 | 61 6e 64 6c 65 72 52 65 |Refcon h|andlerRe|
|00002ec0| 66 43 6f 6e 29 0d 7b 0d | 23 70 72 61 67 6d 61 20 |fCon).{.|#pragma |
|00002ed0| 75 6e 75 73 65 64 28 68 | 61 6e 64 6c 65 72 52 65 |unused(h|andlerRe|
|00002ee0| 66 43 6f 6e 29 0d 09 57 | 45 48 61 6e 64 6c 65 20 |fCon)..W|EHandle |
|00002ef0| 68 57 45 20 3d 20 6e 69 | 6c 3b 0d 09 57 45 50 74 |hWE = ni|l;..WEPt|
|00002f00| 72 20 70 57 45 3b 0d 09 | 53 49 6e 74 33 32 20 6f |r pWE;..|SInt32 o|
|00002f10| 66 66 73 65 74 3b 0d 09 | 4c 6f 6e 67 50 74 20 74 |ffset;..|LongPt t|
|00002f20| 68 65 50 6f 69 6e 74 3b | 0d 09 50 6f 69 6e 74 20 |hePoint;|..Point |
|00002f30| 70 6f 73 69 74 69 6f 6e | 3b 0d 09 53 49 6e 74 31 |position|;..SInt1|
|00002f40| 36 20 6c 69 6e 65 48 65 | 69 67 68 74 3b 0d 09 44 |6 lineHe|ight;..D|
|00002f50| 65 73 63 54 79 70 65 20 | 61 63 74 75 61 6c 54 79 |escType |actualTy|
|00002f60| 70 65 3b 0d 09 53 49 6e | 74 33 32 20 61 63 74 75 |pe;..SIn|t32 actu|
|00002f70| 61 6c 53 69 7a 65 3b 0d | 09 47 72 61 66 50 74 72 |alSize;.|.GrafPtr|
|00002f80| 20 73 61 76 65 50 6f 72 | 74 3b 0d 09 42 6f 6f 6c | savePor|t;..Bool|
|00002f90| 65 61 6e 20 73 61 76 65 | 57 45 4c 6f 63 6b 20 3d |ean save|WELock =|
|00002fa0| 20 66 61 6c 73 65 3b 0d | 09 4f 53 45 72 72 20 65 | false;.|.OSErr e|
|00002fb0| 72 72 3b 0d 0d 09 2f 2f | 20 65 78 74 72 61 63 74 |rr;...//| extract|
|00002fc0| 20 57 45 20 68 61 6e 64 | 6c 65 0d 09 69 66 20 28 | WE hand|le..if (|
|00002fd0| 28 65 72 72 20 3d 20 41 | 45 47 65 74 50 61 72 61 |(err = A|EGetPara|
|00002fe0| 6d 50 74 72 28 61 65 2c | 20 6b 65 79 41 45 54 53 |mPtr(ae,| keyAETS|
|00002ff0| 4d 44 6f 63 75 6d 65 6e | 74 52 65 66 63 6f 6e 2c |MDocumen|tRefcon,|
|00003000| 20 74 79 70 65 4c 6f 6e | 67 49 6e 74 65 67 65 72 | typeLon|gInteger|
|00003010| 2c 0d 09 09 09 26 61 63 | 74 75 61 6c 54 79 70 65 |,....&ac|tualType|
|00003020| 2c 20 26 68 57 45 2c 20 | 73 69 7a 65 6f 66 28 68 |, &hWE, |sizeof(h|
|00003030| 57 45 29 2c 20 26 61 63 | 74 75 61 6c 53 69 7a 65 |WE), &ac|tualSize|
|00003040| 29 29 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 7b 0d |)) != no|Err)..{.|
|00003050| 09 09 67 6f 74 6f 20 63 | 6c 65 61 6e 75 70 3b 0d |..goto c|leanup;.|
|00003060| 09 7d 0d 0d 09 2f 2f 20 | 6c 6f 63 6b 20 74 68 65 |.}...// |lock the|
|00003070| 20 57 45 20 72 65 63 6f | 72 64 0d 09 73 61 76 65 | WE reco|rd..save|
|00003080| 57 45 4c 6f 63 6b 20 3d | 20 5f 57 45 53 65 74 48 |WELock =| _WESetH|
|00003090| 61 6e 64 6c 65 4c 6f 63 | 6b 28 28 48 61 6e 64 6c |andleLoc|k((Handl|
|000030a0| 65 29 20 68 57 45 2c 20 | 74 72 75 65 29 3b 0d 09 |e) hWE, |true);..|
|000030b0| 70 57 45 20 3d 20 2a 68 | 57 45 3b 0d 0d 09 2f 2f |pWE = *h|WE;...//|
|000030c0| 20 69 66 20 74 68 65 72 | 65 27 73 20 6e 6f 20 61 | if ther|e's no a|
|000030d0| 63 74 69 76 65 20 69 6e | 70 75 74 20 61 72 65 61 |ctive in|put area|
|000030e0| 2c 20 72 65 74 75 72 6e | 20 65 72 72 4f 66 66 73 |, return| errOffs|
|000030f0| 65 74 49 6e 76 61 6c 69 | 64 0d 09 65 72 72 20 3d |etInvali|d..err =|
|00003100| 20 65 72 72 4f 66 66 73 | 65 74 49 6e 76 61 6c 69 | errOffs|etInvali|
|00003110| 64 3b 0d 09 69 66 20 28 | 70 57 45 2d 3e 74 73 6d |d;..if (|pWE->tsm|
|00003120| 41 72 65 61 53 74 61 72 | 74 20 3c 20 30 29 0d 09 |AreaStar|t < 0)..|
|00003130| 7b 0d 09 09 67 6f 74 6f | 20 63 6c 65 61 6e 75 70 |{...goto| cleanup|
|00003140| 3b 0d 09 7d 0d 0d 09 2f | 2f 20 65 78 74 72 61 63 |;..}.../|/ extrac|
|00003150| 74 20 74 68 65 20 6f 66 | 66 73 65 74 20 70 61 72 |t the of|fset par|
|00003160| 61 6d 65 74 65 72 0d 09 | 69 66 20 28 28 65 72 72 |ameter..|if ((err|
|00003170| 20 3d 20 41 45 47 65 74 | 50 61 72 61 6d 50 74 72 | = AEGet|ParamPtr|
|00003180| 28 61 65 2c 20 6b 65 79 | 41 45 4f 66 66 73 65 74 |(ae, key|AEOffset|
|00003190| 2c 20 74 79 70 65 4c 6f | 6e 67 49 6e 74 65 67 65 |, typeLo|ngIntege|
|000031a0| 72 2c 20 26 61 63 74 75 | 61 6c 54 79 70 65 2c 20 |r, &actu|alType, |
|000031b0| 26 6f 66 66 73 65 74 2c | 20 73 69 7a 65 6f 66 28 |&offset,| sizeof(|
|000031c0| 6f 66 66 73 65 74 29 2c | 20 26 61 63 74 75 61 6c |offset),| &actual|
|000031d0| 53 69 7a 65 29 29 20 21 | 3d 20 6e 6f 45 72 72 29 |Size)) !|= noErr)|
|000031e0| 0d 09 7b 0d 09 09 67 6f | 74 6f 20 63 6c 65 61 6e |..{...go|to clean|
|000031f0| 75 70 3b 0d 09 7d 0d 0d | 09 2f 2f 20 6f 66 66 73 |up;..}..|.// offs|
|00003200| 65 74 20 69 73 20 72 65 | 6c 61 74 69 76 65 20 74 |et is re|lative t|
|00003210| 6f 20 74 68 65 20 62 65 | 67 69 6e 6e 69 6e 67 20 |o the be|ginning |
|00003220| 6f 66 20 74 68 65 20 61 | 63 74 69 76 65 20 69 6e |of the a|ctive in|
|00003230| 70 75 74 20 61 72 65 61 | 3b 20 77 65 20 77 61 6e |put area|; we wan|
|00003240| 74 20 61 6e 20 61 62 73 | 6f 6c 75 74 65 20 6f 66 |t an abs|olute of|
|00003250| 66 73 65 74 0d 09 6f 66 | 66 73 65 74 20 2b 3d 20 |fset..of|fset += |
|00003260| 70 57 45 2d 3e 74 73 6d | 41 72 65 61 53 74 61 72 |pWE->tsm|AreaStar|
|00003270| 74 3b 0d 0d 09 2f 2f 20 | 6d 61 6b 65 20 73 75 72 |t;...// |make sur|
|00003280| 65 20 74 68 65 20 6f 66 | 66 73 65 74 20 69 73 20 |e the of|fset is |
|00003290| 77 69 74 68 69 6e 20 74 | 68 65 20 69 6e 70 75 74 |within t|he input|
|000032a0| 20 61 72 65 61 0d 09 69 | 66 20 28 28 6f 66 66 73 | area..i|f ((offs|
|000032b0| 65 74 20 3c 20 70 57 45 | 2d 3e 74 73 6d 41 72 65 |et < pWE|->tsmAre|
|000032c0| 61 53 74 61 72 74 29 20 | 7c 7c 20 28 6f 66 66 73 |aStart) ||| (offs|
|000032d0| 65 74 20 3e 3d 20 70 57 | 45 2d 3e 74 73 6d 41 72 |et >= pW|E->tsmAr|
|000032e0| 65 61 45 6e 64 29 29 0d | 09 7b 0d 09 09 65 72 72 |eaEnd)).|.{...err|
|000032f0| 20 3d 20 65 72 72 4f 66 | 66 73 65 74 49 6e 76 61 | = errOf|fsetInva|
|00003300| 6c 69 64 3b 0d 09 09 67 | 6f 74 6f 20 63 6c 65 61 |lid;...g|oto clea|
|00003310| 6e 75 70 3b 0d 09 7d 0d | 0d 09 2f 2f 20 66 69 6e |nup;..}.|..// fin|
|00003320| 64 20 74 68 65 20 70 6f | 73 69 74 69 6f 6e 20 63 |d the po|sition c|
|00003330| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 74 6f 20 |orrespon|ding to |
|00003340| 74 68 65 20 67 69 76 65 | 6e 20 6f 66 66 73 65 74 |the give|n offset|
|00003350| 20 28 69 6e 20 6c 6f 6e | 67 20 63 6f 6f 72 64 69 | (in lon|g coordi|
|00003360| 6e 61 74 65 73 29 0d 09 | 57 45 47 65 74 50 6f 69 |nates)..|WEGetPoi|
|00003370| 6e 74 28 6f 66 66 73 65 | 74 2c 20 68 69 6c 69 74 |nt(offse|t, hilit|
|00003380| 65 2c 20 26 74 68 65 50 | 6f 69 6e 74 2c 20 26 6c |e, &theP|oint, &l|
|00003390| 69 6e 65 48 65 69 67 68 | 74 2c 20 68 57 45 29 3b |ineHeigh|t, hWE);|
|000033a0| 0d 09 74 68 65 50 6f 69 | 6e 74 2e 76 20 2b 3d 20 |..thePoi|nt.v += |
|000033b0| 6c 69 6e 65 48 65 69 67 | 68 74 3b 0d 0d 09 2f 2f |lineHeig|ht;...//|
|000033c0| 20 6d 61 6b 65 20 73 75 | 72 65 20 6f 66 66 73 65 | make su|re offse|
|000033d0| 74 20 69 73 20 77 69 74 | 68 69 6e 20 76 69 65 77 |t is wit|hin view|
|000033e0| 20 72 65 63 74 61 6e 67 | 6c 65 0d 09 69 66 20 28 | rectang|le..if (|
|000033f0| 28 74 68 65 50 6f 69 6e | 74 2e 68 20 3c 20 70 57 |(thePoin|t.h < pW|
|00003400| 45 2d 3e 76 69 65 77 52 | 65 63 74 2e 6c 65 66 74 |E->viewR|ect.left|
|00003410| 29 20 7c 7c 0d 09 09 28 | 74 68 65 50 6f 69 6e 74 |) ||...(|thePoint|
|00003420| 2e 68 20 3e 20 70 57 45 | 2d 3e 76 69 65 77 52 65 |.h > pWE|->viewRe|
|00003430| 63 74 2e 72 69 67 68 74 | 20 29 20 7c 7c 0d 09 09 |ct.right| ) ||...|
|00003440| 28 74 68 65 50 6f 69 6e | 74 2e 76 20 3c 20 70 57 |(thePoin|t.v < pW|
|00003450| 45 2d 3e 76 69 65 77 52 | 65 63 74 2e 74 6f 70 29 |E->viewR|ect.top)|
|00003460| 20 7c 7c 0d 09 09 28 74 | 68 65 50 6f 69 6e 74 2e | ||...(t|hePoint.|
|00003470| 76 20 3e 20 70 57 45 2d | 3e 76 69 65 77 52 65 63 |v > pWE-|>viewRec|
|00003480| 74 2e 62 6f 74 74 6f 6d | 29 29 0d 09 7b 0d 09 09 |t.bottom|))..{...|
|00003490| 65 72 72 20 3d 20 65 72 | 72 4f 66 66 73 65 74 49 |err = er|rOffsetI|
|000034a0| 73 4f 75 74 73 69 64 65 | 4f 66 56 69 65 77 3b 0d |sOutside|OfView;.|
|000034b0| 09 09 67 6f 74 6f 20 63 | 6c 65 61 6e 75 70 3b 0d |..goto c|leanup;.|
|000034c0| 09 7d 0d 0d 09 2f 2f 20 | 63 6f 6e 76 65 72 74 20 |.}...// |convert |
|000034d0| 74 68 65 20 70 6f 69 6e | 74 20 74 6f 20 73 68 6f |the poin|t to sho|
|000034e0| 72 74 2e 2e 2e 0d 09 57 | 45 4c 6f 6e 67 50 6f 69 |rt.....W|ELongPoi|
|000034f0| 6e 74 54 6f 50 6f 69 6e | 74 28 26 74 68 65 50 6f |ntToPoin|t(&thePo|
|00003500| 69 6e 74 2c 20 26 70 6f | 73 69 74 69 6f 6e 29 3b |int, &po|sition);|
|00003510| 0d 0d 09 2f 2f 20 2e 2e | 2e 61 6e 64 20 67 6c 6f |...// ..|.and glo|
|00003520| 62 61 6c 20 63 6f 6f 72 | 64 69 6e 61 74 65 73 0d |bal coor|dinates.|
|00003530| 09 47 65 74 50 6f 72 74 | 28 26 73 61 76 65 50 6f |.GetPort|(&savePo|
|00003540| 72 74 29 3b 0d 09 53 65 | 74 50 6f 72 74 28 70 57 |rt);..Se|tPort(pW|
|00003550| 45 2d 3e 70 6f 72 74 29 | 3b 0d 09 4c 6f 63 61 6c |E->port)|;..Local|
|00003560| 54 6f 47 6c 6f 62 61 6c | 28 26 70 6f 73 69 74 69 |ToGlobal|(&positi|
|00003570| 6f 6e 29 3b 0d 09 53 65 | 74 50 6f 72 74 28 73 61 |on);..Se|tPort(sa|
|00003580| 76 65 50 6f 72 74 29 3b | 0d 0d 09 2f 2f 20 61 64 |vePort);|...// ad|
|00003590| 64 20 6b 65 79 41 45 50 | 6f 69 6e 74 20 70 61 72 |d keyAEP|oint par|
|000035a0| 61 6d 65 74 65 72 20 74 | 6f 20 74 68 65 20 72 65 |ameter t|o the re|
|000035b0| 70 6c 79 20 41 70 70 6c | 65 20 65 76 65 6e 74 0d |ply Appl|e event.|
|000035c0| 09 69 66 20 28 28 65 72 | 72 20 3d 20 41 45 50 75 |.if ((er|r = AEPu|
|000035d0| 74 50 61 72 61 6d 50 74 | 72 28 72 65 70 6c 79 2c |tParamPt|r(reply,|
|000035e0| 20 6b 65 79 41 45 50 6f | 69 6e 74 2c 20 74 79 70 | keyAEPo|int, typ|
|000035f0| 65 51 44 50 6f 69 6e 74 | 2c 0d 09 09 09 26 70 6f |eQDPoint|,....&po|
|00003600| 73 69 74 69 6f 6e 2c 20 | 73 69 7a 65 6f 66 28 70 |sition, |sizeof(p|
|00003610| 6f 73 69 74 69 6f 6e 29 | 29 29 20 21 3d 20 6e 6f |osition)|)) != no|
|00003620| 45 72 72 29 0d 09 7b 0d | 09 09 67 6f 74 6f 20 63 |Err)..{.|..goto c|
|00003630| 6c 65 61 6e 75 70 3b 0d | 09 7d 0d 0d 09 2f 2f 20 |leanup;.|.}...// |
|00003640| 61 64 64 20 6b 65 79 41 | 45 54 53 4d 54 65 78 74 |add keyA|ETSMText|
|00003650| 46 6f 6e 74 20 70 61 72 | 61 6d 65 74 65 72 20 74 |Font par|ameter t|
|00003660| 6f 20 74 68 65 20 72 65 | 70 6c 79 20 41 70 70 6c |o the re|ply Appl|
|00003670| 65 20 65 76 65 6e 74 0d | 09 69 66 20 28 28 65 72 |e event.|.if ((er|
|00003680| 72 20 3d 20 41 45 50 75 | 74 50 61 72 61 6d 50 74 |r = AEPu|tParamPt|
|00003690| 72 28 72 65 70 6c 79 2c | 20 6b 65 79 41 45 54 53 |r(reply,| keyAETS|
|000036a0| 4d 54 65 78 74 46 6f 6e | 74 2c 20 74 79 70 65 53 |MTextFon|t, typeS|
|000036b0| 68 6f 72 74 49 6e 74 65 | 67 65 72 2c 0d 09 09 09 |hortInte|ger,....|
|000036c0| 26 70 57 45 2d 3e 6e 75 | 6c 6c 53 74 79 6c 65 2e |&pWE->nu|llStyle.|
|000036d0| 72 75 6e 53 74 79 6c 65 | 2e 74 73 46 6f 6e 74 2c |runStyle|.tsFont,|
|000036e0| 20 73 69 7a 65 6f 66 28 | 70 57 45 2d 3e 6e 75 6c | sizeof(|pWE->nul|
|000036f0| 6c 53 74 79 6c 65 2e 72 | 75 6e 53 74 79 6c 65 2e |lStyle.r|unStyle.|
|00003700| 74 73 46 6f 6e 74 29 29 | 29 20 21 3d 20 6e 6f 45 |tsFont))|) != noE|
|00003710| 72 72 29 0d 09 7b 0d 09 | 09 67 6f 74 6f 20 63 6c |rr)..{..|.goto cl|
|00003720| 65 61 6e 75 70 3b 0d 09 | 7d 0d 0d 09 2f 2f 20 61 |eanup;..|}...// a|
|00003730| 64 64 20 6b 65 79 41 45 | 54 53 4d 54 65 78 74 50 |dd keyAE|TSMTextP|
|00003740| 6f 69 6e 74 53 69 7a 65 | 20 70 61 72 61 6d 65 74 |ointSize| paramet|
|00003750| 65 72 20 74 6f 20 74 68 | 65 20 72 65 70 6c 79 20 |er to th|e reply |
|00003760| 41 70 70 6c 65 20 65 76 | 65 6e 74 0d 09 69 66 20 |Apple ev|ent..if |
|00003770| 28 28 65 72 72 20 3d 20 | 41 45 50 75 74 50 61 72 |((err = |AEPutPar|
|00003780| 61 6d 50 74 72 28 72 65 | 70 6c 79 2c 20 6b 65 79 |amPtr(re|ply, key|
|00003790| 41 45 54 53 4d 54 65 78 | 74 50 6f 69 6e 74 53 69 |AETSMTex|tPointSi|
|000037a0| 7a 65 2c 20 74 79 70 65 | 53 68 6f 72 74 49 6e 74 |ze, type|ShortInt|
|000037b0| 65 67 65 72 2c 0d 09 09 | 09 26 70 57 45 2d 3e 6e |eger,...|.&pWE->n|
|000037c0| 75 6c 6c 53 74 79 6c 65 | 2e 72 75 6e 53 74 79 6c |ullStyle|.runStyl|
|000037d0| 65 2e 74 73 53 69 7a 65 | 2c 20 73 69 7a 65 6f 66 |e.tsSize|, sizeof|
|000037e0| 28 70 57 45 2d 3e 6e 75 | 6c 6c 53 74 79 6c 65 2e |(pWE->nu|llStyle.|
|000037f0| 72 75 6e 53 74 79 6c 65 | 2e 74 73 53 69 7a 65 29 |runStyle|.tsSize)|
|00003800| 29 29 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 7b 0d |)) != no|Err)..{.|
|00003810| 09 09 67 6f 74 6f 20 63 | 6c 65 61 6e 75 70 3b 0d |..goto c|leanup;.|
|00003820| 09 7d 0d 0d 09 2f 2f 20 | 61 64 64 20 6b 65 79 41 |.}...// |add keyA|
|00003830| 45 54 65 78 74 4c 69 6e | 65 41 73 63 65 6e 74 20 |ETextLin|eAscent |
|00003840| 70 61 72 61 6d 65 74 65 | 72 20 74 6f 20 74 68 65 |paramete|r to the|
|00003850| 20 72 65 70 6c 79 20 41 | 70 70 6c 65 20 65 76 65 | reply A|pple eve|
|00003860| 6e 74 0d 09 69 66 20 28 | 28 65 72 72 20 3d 20 41 |nt..if (|(err = A|
|00003870| 45 50 75 74 50 61 72 61 | 6d 50 74 72 28 72 65 70 |EPutPara|mPtr(rep|
|00003880| 6c 79 2c 20 6b 65 79 41 | 45 54 65 78 74 4c 69 6e |ly, keyA|ETextLin|
|00003890| 65 41 73 63 65 6e 74 2c | 20 74 79 70 65 53 68 6f |eAscent,| typeSho|
|000038a0| 72 74 49 6e 74 65 67 65 | 72 2c 0d 09 09 09 26 70 |rtIntege|r,....&p|
|000038b0| 57 45 2d 3e 6e 75 6c 6c | 53 74 79 6c 65 2e 72 75 |WE->null|Style.ru|
|000038c0| 6e 41 73 63 65 6e 74 2c | 20 73 69 7a 65 6f 66 28 |nAscent,| sizeof(|
|000038d0| 70 57 45 2d 3e 6e 75 6c | 6c 53 74 79 6c 65 2e 72 |pWE->nul|lStyle.r|
|000038e0| 75 6e 41 73 63 65 6e 74 | 29 29 29 20 21 3d 20 6e |unAscent|))) != n|
|000038f0| 6f 45 72 72 29 0d 09 7b | 0d 09 09 67 6f 74 6f 20 |oErr)..{|...goto |
|00003900| 63 6c 65 61 6e 75 70 3b | 0d 09 7d 0d 0d 09 2f 2f |cleanup;|..}...//|
|00003910| 20 61 64 64 20 6b 65 79 | 41 45 54 65 78 74 4c 69 | add key|AETextLi|
|00003920| 6e 65 48 65 69 67 68 74 | 20 70 61 72 61 6d 65 74 |neHeight| paramet|
|00003930| 65 72 20 74 6f 20 74 68 | 65 20 72 65 70 6c 79 20 |er to th|e reply |
|00003940| 41 70 70 6c 65 20 65 76 | 65 6e 74 0d 09 69 66 20 |Apple ev|ent..if |
|00003950| 28 28 65 72 72 20 3d 20 | 41 45 50 75 74 50 61 72 |((err = |AEPutPar|
|00003960| 61 6d 50 74 72 28 72 65 | 70 6c 79 2c 20 6b 65 79 |amPtr(re|ply, key|
|00003970| 41 45 54 65 78 74 4c 69 | 6e 65 48 65 69 67 68 74 |AETextLi|neHeight|
|00003980| 2c 20 74 79 70 65 53 68 | 6f 72 74 49 6e 74 65 67 |, typeSh|ortInteg|
|00003990| 65 72 2c 0d 09 09 09 26 | 70 57 45 2d 3e 6e 75 6c |er,....&|pWE->nul|
|000039a0| 6c 53 74 79 6c 65 2e 72 | 75 6e 48 65 69 67 68 74 |lStyle.r|unHeight|
|000039b0| 2c 20 73 69 7a 65 6f 66 | 28 70 57 45 2d 3e 6e 75 |, sizeof|(pWE->nu|
|000039c0| 6c 6c 53 74 79 6c 65 2e | 72 75 6e 48 65 69 67 68 |llStyle.|runHeigh|
|000039d0| 74 29 29 29 20 21 3d 20 | 6e 6f 45 72 72 29 0d 09 |t))) != |noErr)..|
|000039e0| 7b 0d 09 09 67 6f 74 6f | 20 63 6c 65 61 6e 75 70 |{...goto| cleanup|
|000039f0| 3b 0d 09 7d 0d 0d 09 2f | 2f 20 63 6c 65 61 72 20 |;..}.../|/ clear |
|00003a00| 72 65 73 75 6c 74 20 63 | 6f 64 65 0d 09 65 72 72 |result c|ode..err|
|00003a10| 20 3d 20 6e 6f 45 72 72 | 3b 0d 0d 63 6c 65 61 6e | = noErr|;..clean|
|00003a20| 75 70 3a 0d 09 2f 2f 20 | 75 6e 6c 6f 63 6b 20 74 |up:..// |unlock t|
|00003a30| 68 65 20 57 45 20 72 65 | 63 6f 72 64 0d 09 69 66 |he WE re|cord..if|
|00003a40| 20 28 68 57 45 20 21 3d | 20 6e 69 6c 29 0d 09 7b | (hWE !=| nil)..{|
|00003a50| 0d 09 09 5f 57 45 53 65 | 74 48 61 6e 64 6c 65 4c |..._WESe|tHandleL|
|00003a60| 6f 63 6b 28 28 48 61 6e | 64 6c 65 29 20 68 57 45 |ock((Han|dle) hWE|
|00003a70| 2c 20 73 61 76 65 57 45 | 4c 6f 63 6b 29 3b 0d 09 |, saveWE|Lock);..|
|00003a80| 7d 0d 0d 09 2f 2f 20 72 | 65 74 75 72 6e 20 72 65 |}...// r|eturn re|
|00003a90| 73 75 6c 74 20 63 6f 64 | 65 0d 09 72 65 74 75 72 |sult cod|e..retur|
|00003aa0| 6e 20 65 72 72 3b 0d 7d | 0d 0d 73 74 61 74 69 63 |n err;.}|..static|
|00003ab0| 20 70 61 73 63 61 6c 20 | 4f 53 45 72 72 20 5f 57 | pascal |OSErr _W|
|00003ac0| 45 48 61 6e 64 6c 65 47 | 65 74 54 65 78 74 28 63 |EHandleG|etText(c|
|00003ad0| 6f 6e 73 74 20 41 70 70 | 6c 65 45 76 65 6e 74 20 |onst App|leEvent |
|00003ae0| 2a 61 65 2c 20 41 70 70 | 6c 65 45 76 65 6e 74 20 |*ae, App|leEvent |
|00003af0| 2a 72 65 70 6c 79 2c 20 | 41 45 48 61 6e 64 6c 65 |*reply, |AEHandle|
|00003b00| 72 52 65 66 63 6f 6e 20 | 68 61 6e 64 6c 65 72 52 |rRefcon |handlerR|
|00003b10| 65 66 43 6f 6e 29 0d 7b | 0d 23 70 72 61 67 6d 61 |efCon).{|.#pragma|
|00003b20| 20 75 6e 75 73 65 64 28 | 68 61 6e 64 6c 65 72 52 | unused(|handlerR|
|00003b30| 65 66 43 6f 6e 29 0d 0d | 09 57 45 48 61 6e 64 6c |efCon)..|.WEHandl|
|00003b40| 65 20 68 57 45 20 3d 20 | 6e 69 6c 3b 0d 09 57 45 |e hWE = |nil;..WE|
|00003b50| 50 74 72 20 70 57 45 3b | 0d 09 44 65 73 63 54 79 |Ptr pWE;|..DescTy|
|00003b60| 70 65 20 61 63 74 75 61 | 6c 54 79 70 65 3b 0d 09 |pe actua|lType;..|
|00003b70| 53 49 6e 74 33 32 20 61 | 63 74 75 61 6c 53 69 7a |SInt32 a|ctualSiz|
|00003b80| 65 3b 0d 09 42 6f 6f 6c | 65 61 6e 20 73 61 76 65 |e;..Bool|ean save|
|00003b90| 57 45 4c 6f 63 6b 20 3d | 20 66 61 6c 73 65 3b 0d |WELock =| false;.|
|00003ba0| 09 42 6f 6f 6c 65 61 6e | 20 73 61 76 65 54 65 78 |.Boolean| saveTex|
|00003bb0| 74 4c 6f 63 6b 3b 0d 09 | 4f 53 45 72 72 20 65 72 |tLock;..|OSErr er|
|00003bc0| 72 3b 0d 0d 09 2f 2f 20 | 65 78 74 72 61 63 74 20 |r;...// |extract |
|00003bd0| 57 45 20 68 61 6e 64 6c | 65 0d 09 69 66 20 28 28 |WE handl|e..if ((|
|00003be0| 65 72 72 20 3d 20 41 45 | 47 65 74 50 61 72 61 6d |err = AE|GetParam|
|00003bf0| 50 74 72 28 61 65 2c 20 | 6b 65 79 41 45 54 53 4d |Ptr(ae, |keyAETSM|
|00003c00| 44 6f 63 75 6d 65 6e 74 | 52 65 66 63 6f 6e 2c 20 |Document|Refcon, |
|00003c10| 74 79 70 65 4c 6f 6e 67 | 49 6e 74 65 67 65 72 2c |typeLong|Integer,|
|00003c20| 0d 09 09 09 26 61 63 74 | 75 61 6c 54 79 70 65 2c |....&act|ualType,|
|00003c30| 20 26 68 57 45 2c 20 73 | 69 7a 65 6f 66 28 68 57 | &hWE, s|izeof(hW|
|00003c40| 45 29 2c 20 26 61 63 74 | 75 61 6c 53 69 7a 65 29 |E), &act|ualSize)|
|00003c50| 29 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 7b 0d 09 |) != noE|rr)..{..|
|00003c60| 09 67 6f 74 6f 20 63 6c | 65 61 6e 75 70 3b 0d 09 |.goto cl|eanup;..|
|00003c70| 7d 0d 0d 09 2f 2f 20 6c | 6f 63 6b 20 74 68 65 20 |}...// l|ock the |
|00003c80| 57 45 20 72 65 63 6f 72 | 64 0d 09 73 61 76 65 57 |WE recor|d..saveW|
|00003c90| 45 4c 6f 63 6b 20 3d 20 | 5f 57 45 53 65 74 48 61 |ELock = |_WESetHa|
|00003ca0| 6e 64 6c 65 4c 6f 63 6b | 28 28 48 61 6e 64 6c 65 |ndleLock|((Handle|
|00003cb0| 29 20 68 57 45 2c 20 74 | 72 75 65 29 3b 0d 09 70 |) hWE, t|rue);..p|
|00003cc0| 57 45 20 3d 20 2a 68 57 | 45 3b 0d 0d 09 2f 2f 20 |WE = *hW|E;...// |
|00003cd0| 72 65 74 75 72 6e 20 61 | 20 63 6f 70 79 20 6f 66 |return a| copy of|
|00003ce0| 20 74 68 65 20 73 65 6c | 65 63 74 65 64 20 74 65 | the sel|ected te|
|00003cf0| 78 74 20 69 6e 20 74 68 | 65 20 72 65 70 6c 79 20 |xt in th|e reply |
|00003d00| 65 76 65 6e 74 0d 09 73 | 61 76 65 54 65 78 74 4c |event..s|aveTextL|
|00003d10| 6f 63 6b 20 3d 20 5f 57 | 45 53 65 74 48 61 6e 64 |ock = _W|ESetHand|
|00003d20| 6c 65 4c 6f 63 6b 28 70 | 57 45 2d 3e 68 54 65 78 |leLock(p|WE->hTex|
|00003d30| 74 2c 20 74 72 75 65 29 | 3b 0d 09 65 72 72 20 3d |t, true)|;..err =|
|00003d40| 20 41 45 50 75 74 50 61 | 72 61 6d 50 74 72 28 72 | AEPutPa|ramPtr(r|
|00003d50| 65 70 6c 79 2c 20 6b 65 | 79 41 45 54 68 65 44 61 |eply, ke|yAETheDa|
|00003d60| 74 61 2c 20 74 79 70 65 | 54 65 78 74 2c 0d 09 09 |ta, type|Text,...|
|00003d70| 09 2a 70 57 45 2d 3e 68 | 54 65 78 74 20 2b 20 70 |.*pWE->h|Text + p|
|00003d80| 57 45 2d 3e 73 65 6c 53 | 74 61 72 74 2c 20 70 57 |WE->selS|tart, pW|
|00003d90| 45 2d 3e 73 65 6c 45 6e | 64 20 2d 20 70 57 45 2d |E->selEn|d - pWE-|
|00003da0| 3e 73 65 6c 53 74 61 72 | 74 29 3b 0d 09 5f 57 45 |>selStar|t);.._WE|
|00003db0| 53 65 74 48 61 6e 64 6c | 65 4c 6f 63 6b 28 70 57 |SetHandl|eLock(pW|
|00003dc0| 45 2d 3e 68 54 65 78 74 | 2c 20 73 61 76 65 54 65 |E->hText|, saveTe|
|00003dd0| 78 74 4c 6f 63 6b 29 3b | 0d 09 69 66 20 28 65 72 |xtLock);|..if (er|
|00003de0| 72 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 7b 0d 09 |r != noE|rr)..{..|
|00003df0| 09 67 6f 74 6f 20 63 6c | 65 61 6e 75 70 3b 0d 09 |.goto cl|eanup;..|
|00003e00| 7d 0d 0d 09 2f 2f 20 63 | 6c 65 61 72 20 72 65 73 |}...// c|lear res|
|00003e10| 75 6c 74 20 63 6f 64 65 | 0d 09 65 72 72 20 3d 20 |ult code|..err = |
|00003e20| 6e 6f 45 72 72 3b 0d 0d | 63 6c 65 61 6e 75 70 3a |noErr;..|cleanup:|
|00003e30| 0d 09 2f 2f 20 75 6e 6c | 6f 63 6b 20 74 68 65 20 |..// unl|ock the |
|00003e40| 57 45 20 72 65 63 6f 72 | 64 0d 09 69 66 20 28 68 |WE recor|d..if (h|
|00003e50| 57 45 20 21 3d 20 6e 69 | 6c 29 0d 09 7b 0d 09 09 |WE != ni|l)..{...|
|00003e60| 5f 57 45 53 65 74 48 61 | 6e 64 6c 65 4c 6f 63 6b |_WESetHa|ndleLock|
|00003e70| 28 28 48 61 6e 64 6c 65 | 29 20 68 57 45 2c 20 73 |((Handle|) hWE, s|
|00003e80| 61 76 65 57 45 4c 6f 63 | 6b 29 3b 0d 09 7d 0d 0d |aveWELoc|k);..}..|
|00003e90| 09 2f 2f 20 72 65 74 75 | 72 6e 20 72 65 73 75 6c |.// retu|rn resul|
|00003ea0| 74 20 63 6f 64 65 0d 09 | 72 65 74 75 72 6e 20 65 |t code..|return e|
|00003eb0| 72 72 3b 0d 7d 0d 0d 23 | 65 6e 64 69 66 09 2f 2f |rr;.}..#|endif.//|
|00003ec0| 20 57 41 53 54 45 5f 54 | 53 4d 5f 53 55 50 50 4f | WASTE_T|SM_SUPPO|
|00003ed0| 52 54 0d 0d 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |RT..pasc|al OSErr|
|00003ee0| 20 57 45 49 6e 73 74 61 | 6c 6c 54 53 4d 48 61 6e | WEInsta|llTSMHan|
|00003ef0| 64 6c 65 72 73 28 76 6f | 69 64 29 0d 7b 0d 23 69 |dlers(vo|id).{.#i|
|00003f00| 66 20 57 41 53 54 45 5f | 54 53 4d 5f 53 55 50 50 |f WASTE_|TSM_SUPP|
|00003f10| 4f 52 54 0d 09 4f 53 45 | 72 72 20 65 72 72 3b 0d |ORT..OSE|rr err;.|
|00003f20| 0d 09 2f 2f 20 74 68 65 | 20 66 69 72 73 74 20 74 |..// the| first t|
|00003f30| 69 6d 65 20 77 65 27 72 | 65 20 63 61 6c 6c 65 64 |ime we'r|e called|
|00003f40| 2c 20 63 72 65 61 74 65 | 20 72 6f 75 74 69 6e 65 |, create| routine|
|00003f50| 20 64 65 73 63 72 69 70 | 74 6f 72 73 20 66 6f 72 | descrip|tors for|
|00003f60| 20 6f 75 72 20 41 70 70 | 6c 65 20 65 76 65 6e 74 | our App|le event|
|00003f70| 20 68 61 6e 64 6c 65 72 | 73 0d 09 69 66 20 28 5f | handler|s..if (_|
|00003f80| 77 65 55 70 64 61 74 65 | 41 63 74 69 76 65 49 6e |weUpdate|ActiveIn|
|00003f90| 70 75 74 41 72 65 61 48 | 61 6e 64 6c 65 72 20 3d |putAreaH|andler =|
|00003fa0| 3d 20 6e 69 6c 29 0d 09 | 7b 0d 09 09 5f 77 65 55 |= nil)..|{..._weU|
|00003fb0| 70 64 61 74 65 41 63 74 | 69 76 65 49 6e 70 75 74 |pdateAct|iveInput|
|00003fc0| 41 72 65 61 48 61 6e 64 | 6c 65 72 20 3d 20 4e 65 |AreaHand|ler = Ne|
|00003fd0| 77 41 45 45 76 65 6e 74 | 48 61 6e 64 6c 65 72 50 |wAEEvent|HandlerP|
|00003fe0| 72 6f 63 28 5f 57 45 48 | 61 6e 64 6c 65 55 70 64 |roc(_WEH|andleUpd|
|00003ff0| 61 74 65 41 63 74 69 76 | 65 49 6e 70 75 74 41 72 |ateActiv|eInputAr|
|00004000| 65 61 29 3b 0d 09 09 5f | 77 65 50 6f 73 69 74 69 |ea);..._|wePositi|
|00004010| 6f 6e 54 6f 4f 66 66 73 | 65 74 48 61 6e 64 6c 65 |onToOffs|etHandle|
|00004020| 72 20 3d 20 4e 65 77 41 | 45 45 76 65 6e 74 48 61 |r = NewA|EEventHa|
|00004030| 6e 64 6c 65 72 50 72 6f | 63 28 5f 57 45 48 61 6e |ndlerPro|c(_WEHan|
|00004040| 64 6c 65 50 6f 73 69 74 | 69 6f 6e 54 6f 4f 66 66 |dlePosit|ionToOff|
|00004050| 73 65 74 29 3b 0d 09 09 | 5f 77 65 4f 66 66 73 65 |set);...|_weOffse|
|00004060| 74 54 6f 50 6f 73 69 74 | 69 6f 6e 48 61 6e 64 6c |tToPosit|ionHandl|
|00004070| 65 72 20 3d 20 4e 65 77 | 41 45 45 76 65 6e 74 48 |er = New|AEEventH|
|00004080| 61 6e 64 6c 65 72 50 72 | 6f 63 28 5f 57 45 48 61 |andlerPr|oc(_WEHa|
|00004090| 6e 64 6c 65 4f 66 66 73 | 65 74 54 6f 50 6f 73 69 |ndleOffs|etToPosi|
|000040a0| 74 69 6f 6e 29 3b 0d 09 | 09 5f 77 65 47 65 74 54 |tion);..|._weGetT|
|000040b0| 65 78 74 48 61 6e 64 6c | 65 72 20 3d 20 4e 65 77 |extHandl|er = New|
|000040c0| 41 45 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 50 72 |AEEventH|andlerPr|
|000040d0| 6f 63 28 5f 57 45 48 61 | 6e 64 6c 65 47 65 74 54 |oc(_WEHa|ndleGetT|
|000040e0| 65 78 74 29 3b 0d 09 7d | 0d 0d 09 2f 2f 20 69 6e |ext);..}|...// in|
|000040f0| 73 74 61 6c 6c 20 41 70 | 70 6c 65 20 45 76 65 6e |stall Ap|ple Even|
|00004100| 74 20 68 61 6e 64 6c 65 | 72 73 20 74 6f 20 62 65 |t handle|rs to be|
|00004110| 20 75 73 65 64 20 62 79 | 20 54 65 78 74 20 53 65 | used by| Text Se|
|00004120| 72 76 69 63 65 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |rvice co|mponents|
|00004130| 0d 09 69 66 20 28 28 65 | 72 72 20 3d 20 41 45 49 |..if ((e|rr = AEI|
|00004140| 6e 73 74 61 6c 6c 45 76 | 65 6e 74 48 61 6e 64 6c |nstallEv|entHandl|
|00004150| 65 72 28 6b 54 65 78 74 | 53 65 72 76 69 63 65 43 |er(kText|ServiceC|
|00004160| 6c 61 73 73 2c 20 6b 55 | 70 64 61 74 65 41 63 74 |lass, kU|pdateAct|
|00004170| 69 76 65 49 6e 70 75 74 | 41 72 65 61 2c 20 5f 77 |iveInput|Area, _w|
|00004180| 65 55 70 64 61 74 65 41 | 63 74 69 76 65 49 6e 70 |eUpdateA|ctiveInp|
|00004190| 75 74 41 72 65 61 48 61 | 6e 64 6c 65 72 2c 20 30 |utAreaHa|ndler, 0|
|000041a0| 2c 20 66 61 6c 73 65 29 | 29 20 21 3d 20 6e 6f 45 |, false)|) != noE|
|000041b0| 72 72 29 0d 09 7b 0d 09 | 09 67 6f 74 6f 20 63 6c |rr)..{..|.goto cl|
|000041c0| 65 61 6e 75 70 3b 0d 09 | 7d 0d 0d 09 69 66 20 28 |eanup;..|}...if (|
|000041d0| 28 65 72 72 20 3d 20 41 | 45 49 6e 73 74 61 6c 6c |(err = A|EInstall|
|000041e0| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 28 6b 54 65 |EventHan|dler(kTe|
|000041f0| 78 74 53 65 72 76 69 63 | 65 43 6c 61 73 73 2c 20 |xtServic|eClass, |
|00004200| 6b 50 6f 73 32 4f 66 66 | 73 65 74 2c 20 5f 77 65 |kPos2Off|set, _we|
|00004210| 50 6f 73 69 74 69 6f 6e | 54 6f 4f 66 66 73 65 74 |Position|ToOffset|
|00004220| 48 61 6e 64 6c 65 72 2c | 20 30 2c 20 66 61 6c 73 |Handler,| 0, fals|
|00004230| 65 29 29 20 21 3d 20 6e | 6f 45 72 72 29 0d 09 7b |e)) != n|oErr)..{|
|00004240| 0d 09 09 67 6f 74 6f 20 | 63 6c 65 61 6e 75 70 3b |...goto |cleanup;|
|00004250| 0d 09 7d 0d 0d 09 69 66 | 20 28 28 65 72 72 20 3d |..}...if| ((err =|
|00004260| 20 41 45 49 6e 73 74 61 | 6c 6c 45 76 65 6e 74 48 | AEInsta|llEventH|
|00004270| 61 6e 64 6c 65 72 28 6b | 54 65 78 74 53 65 72 76 |andler(k|TextServ|
|00004280| 69 63 65 43 6c 61 73 73 | 2c 20 6b 4f 66 66 73 65 |iceClass|, kOffse|
|00004290| 74 32 50 6f 73 2c 20 5f | 77 65 4f 66 66 73 65 74 |t2Pos, _|weOffset|
|000042a0| 54 6f 50 6f 73 69 74 69 | 6f 6e 48 61 6e 64 6c 65 |ToPositi|onHandle|
|000042b0| 72 2c 20 30 2c 20 66 61 | 6c 73 65 29 29 20 21 3d |r, 0, fa|lse)) !=|
|000042c0| 20 6e 6f 45 72 72 29 0d | 09 7b 0d 09 09 67 6f 74 | noErr).|.{...got|
|000042d0| 6f 20 63 6c 65 61 6e 75 | 70 3b 0d 09 7d 0d 0d 09 |o cleanu|p;..}...|
|000042e0| 69 66 20 28 28 65 72 72 | 20 3d 20 41 45 49 6e 73 |if ((err| = AEIns|
|000042f0| 74 61 6c 6c 45 76 65 6e | 74 48 61 6e 64 6c 65 72 |tallEven|tHandler|
|00004300| 28 6b 54 65 78 74 53 65 | 72 76 69 63 65 43 6c 61 |(kTextSe|rviceCla|
|00004310| 73 73 2c 20 6b 47 65 74 | 54 65 78 74 2c 20 5f 77 |ss, kGet|Text, _w|
|00004320| 65 47 65 74 54 65 78 74 | 48 61 6e 64 6c 65 72 2c |eGetText|Handler,|
|00004330| 20 30 2c 20 66 61 6c 73 | 65 29 29 20 21 3d 20 6e | 0, fals|e)) != n|
|00004340| 6f 45 72 72 29 0d 09 7b | 0d 09 09 67 6f 74 6f 20 |oErr)..{|...goto |
|00004350| 63 6c 65 61 6e 75 70 3b | 0d 09 7d 0d 0d 09 2f 2f |cleanup;|..}...//|
|00004360| 20 63 6c 65 61 72 20 72 | 65 73 75 6c 74 20 63 6f | clear r|esult co|
|00004370| 64 65 0d 09 65 72 72 20 | 3d 20 6e 6f 45 72 72 3b |de..err |= noErr;|
|00004380| 0d 0d 63 6c 65 61 6e 75 | 70 3a 0d 09 2f 2f 20 72 |..cleanu|p:..// r|
|00004390| 65 74 75 72 6e 20 72 65 | 73 75 6c 74 20 63 6f 64 |eturn re|sult cod|
|000043a0| 65 0d 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 23 |e..retur|n err;.#|
|000043b0| 65 6c 73 65 0d 09 72 65 | 74 75 72 6e 20 6e 6f 45 |else..re|turn noE|
|000043c0| 72 72 20 3b 0d 23 65 6e | 64 69 66 09 2f 2f 20 57 |rr ;.#en|dif.// W|
|000043d0| 41 53 54 45 5f 54 53 4d | 5f 53 55 50 50 4f 52 54 |ASTE_TSM|_SUPPORT|
|000043e0| 0d 7d 0d 0d 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |.}..pasc|al OSErr|
|000043f0| 20 57 45 52 65 6d 6f 76 | 65 54 53 4d 48 61 6e 64 | WERemov|eTSMHand|
|00004400| 6c 65 72 73 28 76 6f 69 | 64 29 0d 7b 0d 23 69 66 |lers(voi|d).{.#if|
|00004410| 20 57 41 53 54 45 5f 54 | 53 4d 5f 53 55 50 50 4f | WASTE_T|SM_SUPPO|
|00004420| 52 54 0d 09 4f 53 45 72 | 72 20 65 72 72 3b 0d 0d |RT..OSEr|r err;..|
|00004430| 09 2f 2f 20 72 65 74 75 | 72 6e 20 61 6e 20 65 72 |.// retu|rn an er|
|00004440| 72 6f 72 20 63 6f 64 65 | 20 69 66 20 57 45 49 6e |ror code| if WEIn|
|00004450| 73 74 61 6c 6c 54 53 4d | 48 61 6e 64 6c 65 72 73 |stallTSM|Handlers|
|00004460| 20 68 61 73 20 6e 65 76 | 65 72 20 62 65 65 6e 20 | has nev|er been |
|00004470| 63 61 6c 6c 65 64 0d 09 | 69 66 20 28 5f 77 65 55 |called..|if (_weU|
|00004480| 70 64 61 74 65 41 63 74 | 69 76 65 49 6e 70 75 74 |pdateAct|iveInput|
|00004490| 41 72 65 61 48 61 6e 64 | 6c 65 72 20 3d 3d 20 6e |AreaHand|ler == n|
|000044a0| 69 6c 29 0d 09 7b 0d 09 | 09 72 65 74 75 72 6e 20 |il)..{..|.return |
|000044b0| 65 72 72 41 45 48 61 6e | 64 6c 65 72 4e 6f 74 46 |errAEHan|dlerNotF|
|000044c0| 6f 75 6e 64 3b 0d 09 7d | 0d 0d 09 2f 2f 20 72 65 |ound;..}|...// re|
|000044d0| 6d 6f 76 65 20 74 68 65 | 20 68 61 6e 64 6c 65 72 |move the| handler|
|000044e0| 73 0d 09 69 66 20 28 28 | 65 72 72 20 3d 20 41 45 |s..if ((|err = AE|
|000044f0| 52 65 6d 6f 76 65 45 76 | 65 6e 74 48 61 6e 64 6c |RemoveEv|entHandl|
|00004500| 65 72 28 6b 54 65 78 74 | 53 65 72 76 69 63 65 43 |er(kText|ServiceC|
|00004510| 6c 61 73 73 2c 20 6b 55 | 70 64 61 74 65 41 63 74 |lass, kU|pdateAct|
|00004520| 69 76 65 49 6e 70 75 74 | 41 72 65 61 2c 20 5f 77 |iveInput|Area, _w|
|00004530| 65 55 70 64 61 74 65 41 | 63 74 69 76 65 49 6e 70 |eUpdateA|ctiveInp|
|00004540| 75 74 41 72 65 61 48 61 | 6e 64 6c 65 72 2c 20 66 |utAreaHa|ndler, f|
|00004550| 61 6c 73 65 29 29 20 21 | 3d 20 6e 6f 45 72 72 29 |alse)) !|= noErr)|
|00004560| 0d 09 7b 0d 09 09 67 6f | 74 6f 20 63 6c 65 61 6e |..{...go|to clean|
|00004570| 75 70 3b 0d 09 7d 0d 0d | 09 69 66 20 28 28 65 72 |up;..}..|.if ((er|
|00004580| 72 20 3d 20 41 45 52 65 | 6d 6f 76 65 45 76 65 6e |r = AERe|moveEven|
|00004590| 74 48 61 6e 64 6c 65 72 | 28 6b 54 65 78 74 53 65 |tHandler|(kTextSe|
|000045a0| 72 76 69 63 65 43 6c 61 | 73 73 2c 20 6b 50 6f 73 |rviceCla|ss, kPos|
|000045b0| 32 4f 66 66 73 65 74 2c | 20 5f 77 65 50 6f 73 69 |2Offset,| _wePosi|
|000045c0| 74 69 6f 6e 54 6f 4f 66 | 66 73 65 74 48 61 6e 64 |tionToOf|fsetHand|
|000045d0| 6c 65 72 2c 20 66 61 6c | 73 65 29 29 20 21 3d 20 |ler, fal|se)) != |
|000045e0| 6e 6f 45 72 72 29 0d 09 | 7b 0d 09 09 67 6f 74 6f |noErr)..|{...goto|
|000045f0| 20 63 6c 65 61 6e 75 70 | 3b 0d 09 7d 0d 0d 09 69 | cleanup|;..}...i|
|00004600| 66 20 28 28 65 72 72 20 | 3d 20 41 45 52 65 6d 6f |f ((err |= AERemo|
|00004610| 76 65 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 28 6b |veEventH|andler(k|
|00004620| 54 65 78 74 53 65 72 76 | 69 63 65 43 6c 61 73 73 |TextServ|iceClass|
|00004630| 2c 20 6b 4f 66 66 73 65 | 74 32 50 6f 73 2c 20 5f |, kOffse|t2Pos, _|
|00004640| 77 65 4f 66 66 73 65 74 | 54 6f 50 6f 73 69 74 69 |weOffset|ToPositi|
|00004650| 6f 6e 48 61 6e 64 6c 65 | 72 2c 20 66 61 6c 73 65 |onHandle|r, false|
|00004660| 29 29 20 21 3d 20 6e 6f | 45 72 72 29 0d 09 7b 0d |)) != no|Err)..{.|
|00004670| 09 09 67 6f 74 6f 20 63 | 6c 65 61 6e 75 70 3b 0d |..goto c|leanup;.|
|00004680| 09 7d 0d 0d 09 69 66 20 | 28 28 65 72 72 20 3d 20 |.}...if |((err = |
|00004690| 41 45 52 65 6d 6f 76 65 | 45 76 65 6e 74 48 61 6e |AERemove|EventHan|
|000046a0| 64 6c 65 72 28 6b 54 65 | 78 74 53 65 72 76 69 63 |dler(kTe|xtServic|
|000046b0| 65 43 6c 61 73 73 2c 20 | 6b 47 65 74 54 65 78 74 |eClass, |kGetText|
|000046c0| 2c 20 5f 77 65 47 65 74 | 54 65 78 74 48 61 6e 64 |, _weGet|TextHand|
|000046d0| 6c 65 72 2c 20 66 61 6c | 73 65 29 29 20 21 3d 20 |ler, fal|se)) != |
|000046e0| 6e 6f 45 72 72 29 0d 09 | 7b 0d 09 09 67 6f 74 6f |noErr)..|{...goto|
|000046f0| 20 63 6c 65 61 6e 75 70 | 3b 0d 09 7d 0d 0d 09 2f | cleanup|;..}.../|
|00004700| 2f 20 63 6c 65 61 72 20 | 72 65 73 75 6c 74 20 63 |/ clear |result c|
|00004710| 6f 64 65 0d 09 65 72 72 | 20 3d 20 6e 6f 45 72 72 |ode..err| = noErr|
|00004720| 3b 0d 0d 63 6c 65 61 6e | 75 70 3a 0d 09 2f 2f 20 |;..clean|up:..// |
|00004730| 63 6c 65 61 72 20 72 65 | 73 75 6c 74 20 63 6f 64 |clear re|sult cod|
|00004740| 65 0d 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 23 |e..retur|n err;.#|
|00004750| 65 6c 73 65 0d 09 72 65 | 74 75 72 6e 20 6e 6f 45 |else..re|turn noE|
|00004760| 72 72 20 3b 0d 23 65 6e | 64 69 66 09 2f 2f 20 57 |rr ;.#en|dif.// W|
|00004770| 41 53 54 45 5f 54 53 4d | 5f 53 55 50 50 4f 52 54 |ASTE_TSM|_SUPPORT|
|00004780| 0d 7d 0d 0d 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |.}..pasc|al OSErr|
|00004790| 20 57 45 48 61 6e 64 6c | 65 54 53 4d 45 76 65 6e | WEHandl|eTSMEven|
|000047a0| 74 28 63 6f 6e 73 74 20 | 41 70 70 6c 65 45 76 65 |t(const |AppleEve|
|000047b0| 6e 74 20 2a 61 65 2c 20 | 41 70 70 6c 65 45 76 65 |nt *ae, |AppleEve|
|000047c0| 6e 74 20 2a 72 65 70 6c | 79 29 0d 7b 0d 23 69 66 |nt *repl|y).{.#if|
|000047d0| 20 57 41 53 54 45 5f 54 | 53 4d 5f 53 55 50 50 4f | WASTE_T|SM_SUPPO|
|000047e0| 52 54 0d 09 41 45 45 76 | 65 6e 74 43 6c 61 73 73 |RT..AEEv|entClass|
|000047f0| 20 65 76 65 6e 74 43 6c | 61 73 73 3b 0d 09 41 45 | eventCl|ass;..AE|
|00004800| 45 76 65 6e 74 49 44 20 | 65 76 65 6e 74 49 44 3b |EventID |eventID;|
|00004810| 0d 09 44 65 73 63 54 79 | 70 65 20 61 63 74 75 61 |..DescTy|pe actua|
|00004820| 6c 54 79 70 65 3b 0d 09 | 53 69 7a 65 20 61 63 74 |lType;..|Size act|
|00004830| 75 61 6c 53 69 7a 65 3b | 0d 09 4f 53 45 72 72 20 |ualSize;|..OSErr |
|00004840| 65 72 72 3b 0d 0d 09 2f | 2f 09 67 65 74 20 65 76 |err;.../|/.get ev|
|00004850| 65 6e 74 20 63 6c 61 73 | 73 0d 09 69 66 20 28 28 |ent clas|s..if ((|
|00004860| 65 72 72 20 3d 20 41 45 | 47 65 74 41 74 74 72 69 |err = AE|GetAttri|
|00004870| 62 75 74 65 50 74 72 28 | 61 65 2c 20 6b 65 79 45 |butePtr(|ae, keyE|
|00004880| 76 65 6e 74 43 6c 61 73 | 73 41 74 74 72 2c 20 74 |ventClas|sAttr, t|
|00004890| 79 70 65 54 79 70 65 2c | 20 26 61 63 74 75 61 6c |ypeType,| &actual|
|000048a0| 54 79 70 65 2c 20 26 65 | 76 65 6e 74 43 6c 61 73 |Type, &e|ventClas|
|000048b0| 73 2c 20 73 69 7a 65 6f | 66 28 65 76 65 6e 74 43 |s, sizeo|f(eventC|
|000048c0| 6c 61 73 73 29 2c 20 26 | 61 63 74 75 61 6c 53 69 |lass), &|actualSi|
|000048d0| 7a 65 29 29 20 21 3d 20 | 6e 6f 45 72 72 29 0d 09 |ze)) != |noErr)..|
|000048e0| 7b 0d 09 09 67 6f 74 6f | 20 63 6c 65 61 6e 75 70 |{...goto| cleanup|
|000048f0| 3b 0d 09 7d 0d 0d 09 2f | 2f 09 6d 61 6b 65 20 73 |;..}.../|/.make s|
|00004900| 75 72 65 20 74 68 65 20 | 65 76 65 6e 74 20 63 6c |ure the |event cl|
|00004910| 61 73 73 20 69 73 20 6b | 54 65 78 74 53 65 72 76 |ass is k|TextServ|
|00004920| 69 63 65 43 6c 61 73 73 | 0d 09 65 72 72 20 3d 20 |iceClass|..err = |
|00004930| 65 72 72 41 45 45 76 65 | 6e 74 4e 6f 74 48 61 6e |errAEEve|ntNotHan|
|00004940| 64 6c 65 64 3b 0d 09 69 | 66 20 28 65 76 65 6e 74 |dled;..i|f (event|
|00004950| 43 6c 61 73 73 20 21 3d | 20 6b 54 65 78 74 53 65 |Class !=| kTextSe|
|00004960| 72 76 69 63 65 43 6c 61 | 73 73 29 0d 09 7b 0d 09 |rviceCla|ss)..{..|
|00004970| 09 67 6f 74 6f 20 63 6c | 65 61 6e 75 70 3b 0d 09 |.goto cl|eanup;..|
|00004980| 7d 0d 0d 09 2f 2f 09 67 | 65 74 20 65 76 65 6e 74 |}...//.g|et event|
|00004990| 20 49 44 0d 09 69 66 20 | 28 28 65 72 72 20 3d 20 | ID..if |((err = |
|000049a0| 41 45 47 65 74 41 74 74 | 72 69 62 75 74 65 50 74 |AEGetAtt|ributePt|
|000049b0| 72 28 61 65 2c 20 6b 65 | 79 45 76 65 6e 74 49 44 |r(ae, ke|yEventID|
|000049c0| 41 74 74 72 2c 20 74 79 | 70 65 54 79 70 65 2c 20 |Attr, ty|peType, |
|000049d0| 26 61 63 74 75 61 6c 54 | 79 70 65 2c 20 26 65 76 |&actualT|ype, &ev|
|000049e0| 65 6e 74 49 44 2c 20 73 | 69 7a 65 6f 66 28 65 76 |entID, s|izeof(ev|
|000049f0| 65 6e 74 49 44 29 2c 20 | 26 61 63 74 75 61 6c 53 |entID), |&actualS|
|00004a00| 69 7a 65 29 29 20 21 3d | 20 6e 6f 45 72 72 29 0d |ize)) !=| noErr).|
|00004a10| 09 7b 0d 09 09 67 6f 74 | 6f 20 63 6c 65 61 6e 75 |.{...got|o cleanu|
|00004a20| 70 3b 0d 09 7d 0d 0d 09 | 2f 2f 09 64 69 73 70 61 |p;..}...|//.dispa|
|00004a30| 74 63 68 20 74 6f 20 61 | 70 70 72 6f 70 72 69 61 |tch to a|ppropria|
|00004a40| 74 65 20 68 61 6e 64 6c | 65 72 0d 09 73 77 69 74 |te handl|er..swit|
|00004a50| 63 68 20 28 65 76 65 6e | 74 49 44 29 0d 09 7b 0d |ch (even|tID)..{.|
|00004a60| 09 09 63 61 73 65 20 6b | 55 70 64 61 74 65 41 63 |..case k|UpdateAc|
|00004a70| 74 69 76 65 49 6e 70 75 | 74 41 72 65 61 3a 0d 09 |tiveInpu|tArea:..|
|00004a80| 09 7b 0d 09 09 09 65 72 | 72 20 3d 20 5f 57 45 48 |.{....er|r = _WEH|
|00004a90| 61 6e 64 6c 65 55 70 64 | 61 74 65 41 63 74 69 76 |andleUpd|ateActiv|
|00004aa0| 65 49 6e 70 75 74 41 72 | 65 61 28 61 65 2c 20 72 |eInputAr|ea(ae, r|
|00004ab0| 65 70 6c 79 2c 20 30 29 | 3b 0d 09 09 09 62 72 65 |eply, 0)|;....bre|
|00004ac0| 61 6b 3b 0d 09 09 7d 0d | 0d 09 09 63 61 73 65 20 |ak;...}.|...case |
|00004ad0| 6b 50 6f 73 32 4f 66 66 | 73 65 74 3a 0d 09 09 7b |kPos2Off|set:...{|
|00004ae0| 0d 09 09 09 65 72 72 20 | 3d 20 5f 57 45 48 61 6e |....err |= _WEHan|
|00004af0| 64 6c 65 50 6f 73 69 74 | 69 6f 6e 54 6f 4f 66 66 |dlePosit|ionToOff|
|00004b00| 73 65 74 28 61 65 2c 20 | 72 65 70 6c 79 2c 20 30 |set(ae, |reply, 0|
|00004b10| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 7d |);....br|eak;...}|
|00004b20| 0d 0d 09 09 63 61 73 65 | 20 6b 4f 66 66 73 65 74 |....case| kOffset|
|00004b30| 32 50 6f 73 3a 0d 09 09 | 7b 0d 09 09 09 65 72 72 |2Pos:...|{....err|
|00004b40| 20 3d 20 5f 57 45 48 61 | 6e 64 6c 65 4f 66 66 73 | = _WEHa|ndleOffs|
|00004b50| 65 74 54 6f 50 6f 73 69 | 74 69 6f 6e 28 61 65 2c |etToPosi|tion(ae,|
|00004b60| 20 72 65 70 6c 79 2c 20 | 30 29 3b 0d 09 09 09 62 | reply, |0);....b|
|00004b70| 72 65 61 6b 3b 0d 09 09 | 7d 0d 0d 09 09 63 61 73 |reak;...|}....cas|
|00004b80| 65 20 6b 47 65 74 54 65 | 78 74 3a 0d 09 09 7b 0d |e kGetTe|xt:...{.|
|00004b90| 09 09 09 65 72 72 20 3d | 20 5f 57 45 48 61 6e 64 |...err =| _WEHand|
|00004ba0| 6c 65 47 65 74 54 65 78 | 74 28 61 65 2c 20 72 65 |leGetTex|t(ae, re|
|00004bb0| 70 6c 79 2c 20 30 29 3b | 0d 09 09 09 62 72 65 61 |ply, 0);|....brea|
|00004bc0| 6b 3b 0d 09 09 7d 0d 0d | 09 09 64 65 66 61 75 6c |k;...}..|..defaul|
|00004bd0| 74 3a 0d 09 09 7b 0d 09 | 09 09 62 72 65 61 6b 3b |t:...{..|..break;|
|00004be0| 0d 09 09 7d 0d 09 7d 0d | 0d 63 6c 65 61 6e 75 70 |...}..}.|.cleanup|
|00004bf0| 3a 0d 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 23 |:..retur|n err;.#|
|00004c00| 65 6c 73 65 0d 09 23 70 | 72 61 67 6d 61 20 75 6e |else..#p|ragma un|
|00004c10| 75 73 65 64 28 61 65 2c | 20 72 65 70 6c 79 29 0d |used(ae,| reply).|
|00004c20| 09 72 65 74 75 72 6e 20 | 65 72 72 41 45 45 76 65 |.return |errAEEve|
|00004c30| 6e 74 4e 6f 74 48 61 6e | 64 6c 65 64 20 3b 0d 23 |ntNotHan|dled ;.#|
|00004c40| 65 6e 64 69 66 0d 7d 0d | 0d 70 61 73 63 61 6c 20 |endif.}.|.pascal |
|00004c50| 76 6f 69 64 20 57 45 53 | 74 6f 70 49 6e 6c 69 6e |void WES|topInlin|
|00004c60| 65 53 65 73 73 69 6f 6e | 28 57 45 48 61 6e 64 6c |eSession|(WEHandl|
|00004c70| 65 20 68 57 45 29 0d 7b | 0d 23 69 66 20 57 41 53 |e hWE).{|.#if WAS|
|00004c80| 54 45 5f 54 53 4d 5f 53 | 55 50 50 4f 52 54 0d 09 |TE_TSM_S|UPPORT..|
|00004c90| 57 45 50 74 72 20 70 57 | 45 20 3d 20 2a 68 57 45 |WEPtr pW|E = *hWE|
|00004ca0| 3b 0d 0d 09 2f 2f 20 63 | 61 6c 6c 20 46 69 78 54 |;...// c|all FixT|
|00004cb0| 53 4d 44 6f 63 75 6d 65 | 6e 74 28 29 20 6f 6e 6c |SMDocume|nt() onl|
|00004cc0| 79 20 69 66 20 74 68 65 | 20 69 6e 6c 69 6e 65 20 |y if the| inline |
|00004cd0| 69 6e 70 75 74 20 61 72 | 65 61 20 69 73 20 61 63 |input ar|ea is ac|
|00004ce0| 74 75 61 6c 6c 79 20 22 | 6f 70 65 6e 22 0d 09 69 |tually "|open"..i|
|00004cf0| 66 20 28 28 70 57 45 2d | 3e 74 73 6d 41 72 65 61 |f ((pWE-|>tsmArea|
|00004d00| 53 74 61 72 74 20 21 3d | 20 6b 49 6e 76 61 6c 69 |Start !=| kInvali|
|00004d10| 64 4f 66 66 73 65 74 29 | 20 26 26 20 28 70 57 45 |dOffset)| && (pWE|
|00004d20| 2d 3e 74 73 6d 52 65 66 | 65 72 65 6e 63 65 20 21 |->tsmRef|erence !|
|00004d30| 3d 20 6e 69 6c 29 29 0d | 09 7b 0d 09 09 46 69 78 |= nil)).|.{...Fix|
|00004d40| 54 53 4d 44 6f 63 75 6d | 65 6e 74 28 70 57 45 2d |TSMDocum|ent(pWE-|
|00004d50| 3e 74 73 6d 52 65 66 65 | 72 65 6e 63 65 29 3b 0d |>tsmRefe|rence);.|
|00004d60| 09 7d 0d 23 65 6c 73 65 | 0d 23 70 72 61 67 6d 61 |.}.#else|.#pragma|
|00004d70| 20 75 6e 75 73 65 64 28 | 68 57 45 29 0d 23 65 6e | unused(|hWE).#en|
|00004d80| 64 69 66 0d 7d 0d 00 00 | 00 00 00 00 00 00 00 00 |dif.}...|........|
|00004d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e00| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00004e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e30| 0f 57 45 49 6e 6c 69 6e | 65 49 6e 70 75 74 2e 63 |.WEInlin|eInput.c|
|00004e40| 20 44 42 2e 63 63 74 73 | 32 70 65 72 6f 6d 6c 6d | DB.ccts|2peromlm|
|00004e50| 02 00 54 45 58 54 43 57 | 49 45 01 00 ff ff ff ff |..TEXTCW|IE......|
|00004e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e70| 00 00 aa c0 b4 fd 00 00 | 49 5e 00 00 01 ac 00 00 |........|I^......|
|00004e80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e90| 00 00 00 00 00 00 00 00 | 00 0f ff ff ff ff ff ff |........|........|
|00004ea0| 00 0f cc cc cc cc cc df | cd dd ef 89 01 01 67 6f |........|......go|
|00004eb0| 00 fc 98 90 10 16 76 e0 | cd dd ef 01 01 01 0d f0 |......v.|........|
|00004ec0| 00 fc 10 10 22 20 17 f0 | cd de f1 03 33 33 de 00 |...." ..|....33..|
|00004ed0| 0f d7 dd 7d dd 7d df 00 | 0f ff ff ff ff ff ff 00 |...}.}..|........|
|00004ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ef0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 00 00 |........|........|
|00004f00| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00004f10| 07 9f d0 c8 03 da 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|00004f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+